SlideShare a Scribd company logo
1 of 10
HIGH PERFORMANCE SESSION
CHECKS
Mikael Lindström
Schibsted Payment
WHAT IS OUR SESSION CHECKS?





Javascript SDK send a session check request
SPiD backend extracts the cookie
Fetches session, client and user objects from MongoDB
Business logic validates the session and checks that the
client has access to the user
 Updates the session timestamp in MongoDB
 Returns some json data in a jsonp container
OLD IMPLEMENTATION
 PHP - implementation
 MongoDB – sessions and clients
PROBLEM
 Our PHP implementation does a lot of bootstrapping
 Loads and initiates unnecessary functionality for each
request
 Huge amount of requests to this specific endpoint
becomes a bottleneck
 Potentially called for each pageview on our clients.
NEW IMPLEMENTATION
 Nginx – ssl termination
 Node.js – implementation
 MongoDB – sessions and clients
TEST MACHINE





HP gen 8 blade
14 node worker processes
14 nginx processes
MongoDB session database

 Testing using LoadImpact (loadimpact.com)
RESULTS
 20 minutes
 7 million requests
 36 cups of coffee
PROBLEMS





Reading PHP sessions in node is hard
Cluster module unstable
Callback hell
Some modules we used was a bit unstable
CONCLUSION
 Solution was more complex than we initially thought. We
could have benefitted from a framework.
 Callbacks vs promises and yields
 Huge performance increase
 Bottleneck today is Nginx (ssl termination)
 ssl termination in Load Balancer
QUESTIONS?

More Related Content

What's hot

What's hot (18)

Altitude SF 2017: Reddit - How we built and scaled r/place
Altitude SF 2017: Reddit - How we built and scaled r/placeAltitude SF 2017: Reddit - How we built and scaled r/place
Altitude SF 2017: Reddit - How we built and scaled r/place
 
ReactJS.NET - Fast and Scalable Single Page Applications
ReactJS.NET - Fast and Scalable Single Page ApplicationsReactJS.NET - Fast and Scalable Single Page Applications
ReactJS.NET - Fast and Scalable Single Page Applications
 
eigr.io – a Serverless Runtime on the BEAM (ACM SIGPLAN, ICFP 2021 Erlang Wor...
eigr.io – a Serverless Runtime on the BEAM (ACM SIGPLAN, ICFP 2021 Erlang Wor...eigr.io – a Serverless Runtime on the BEAM (ACM SIGPLAN, ICFP 2021 Erlang Wor...
eigr.io – a Serverless Runtime on the BEAM (ACM SIGPLAN, ICFP 2021 Erlang Wor...
 
Go & microservices
Go & microservicesGo & microservices
Go & microservices
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
eZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content PublishingeZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content Publishing
 
What we do with Go
What we do with GoWhat we do with Go
What we do with Go
 
Servicestack
ServicestackServicestack
Servicestack
 
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
Do things faster and better with WebAssembly - Sendil Kumar Nellaiyapen - Cod...
 
Extending GWT
Extending GWTExtending GWT
Extending GWT
 
Nodejs
NodejsNodejs
Nodejs
 
Tibco developer
Tibco developerTibco developer
Tibco developer
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web Vitals
 
Inside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYCInside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYC
 
Introduction to MDC Logging in Scala.pdf
Introduction to MDC Logging in Scala.pdfIntroduction to MDC Logging in Scala.pdf
Introduction to MDC Logging in Scala.pdf
 
Ignite Zurich Newsweek
Ignite Zurich   NewsweekIgnite Zurich   Newsweek
Ignite Zurich Newsweek
 
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleAltitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
 
Node.js Blockchain Implementation
Node.js Blockchain ImplementationNode.js Blockchain Implementation
Node.js Blockchain Implementation
 

Viewers also liked

Azure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAzure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentation
Andrea Walker
 
Azure Bootcamp Louisville - Service bus
Azure Bootcamp Louisville - Service busAzure Bootcamp Louisville - Service bus
Azure Bootcamp Louisville - Service bus
Andrea Walker
 
Power point Struktur dinding sel mikroba
Power point Struktur dinding sel mikrobaPower point Struktur dinding sel mikroba
Power point Struktur dinding sel mikroba
Latifa Syifa
 
Power point sejarah peradaban lembah sungai nil
Power point sejarah peradaban lembah sungai nilPower point sejarah peradaban lembah sungai nil
Power point sejarah peradaban lembah sungai nil
Latifa Syifa
 
Power point Sejarah Peradaban Yunani
Power point Sejarah Peradaban YunaniPower point Sejarah Peradaban Yunani
Power point Sejarah Peradaban Yunani
Latifa Syifa
 
PPT agama husnuzzan kelas X
PPT agama husnuzzan kelas XPPT agama husnuzzan kelas X
PPT agama husnuzzan kelas X
Latifa Syifa
 
PPT Kewarganegaraan penegakan HAM kelas X
PPT Kewarganegaraan penegakan HAM kelas XPPT Kewarganegaraan penegakan HAM kelas X
PPT Kewarganegaraan penegakan HAM kelas X
Latifa Syifa
 
Power point biologi organ dan sistem organ kelas XI
Power point biologi organ dan sistem organ kelas XIPower point biologi organ dan sistem organ kelas XI
Power point biologi organ dan sistem organ kelas XI
Latifa Syifa
 
Azure Bootcamp Louisville - Windows azurewebsites
Azure Bootcamp Louisville - Windows azurewebsitesAzure Bootcamp Louisville - Windows azurewebsites
Azure Bootcamp Louisville - Windows azurewebsites
Andrea Walker
 

Viewers also liked (18)

Scalable Event Tracking
Scalable Event TrackingScalable Event Tracking
Scalable Event Tracking
 
Azure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAzure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentation
 
Azure Bootcamp Louisville - Service bus
Azure Bootcamp Louisville - Service busAzure Bootcamp Louisville - Service bus
Azure Bootcamp Louisville - Service bus
 
Ser application form offshore
Ser application form offshoreSer application form offshore
Ser application form offshore
 
Ppt whacy presentation_current
Ppt whacy presentation_currentPpt whacy presentation_current
Ppt whacy presentation_current
 
WHACY Presentation
WHACY PresentationWHACY Presentation
WHACY Presentation
 
китайский
китайскийкитайский
китайский
 
арабский
арабскийарабский
арабский
 
Medical devices introduction
Medical devices introductionMedical devices introduction
Medical devices introduction
 
польский
польскийпольский
польский
 
Eula.1028
Eula.1028Eula.1028
Eula.1028
 
Power point Struktur dinding sel mikroba
Power point Struktur dinding sel mikrobaPower point Struktur dinding sel mikroba
Power point Struktur dinding sel mikroba
 
Power point sejarah peradaban lembah sungai nil
Power point sejarah peradaban lembah sungai nilPower point sejarah peradaban lembah sungai nil
Power point sejarah peradaban lembah sungai nil
 
Power point Sejarah Peradaban Yunani
Power point Sejarah Peradaban YunaniPower point Sejarah Peradaban Yunani
Power point Sejarah Peradaban Yunani
 
PPT agama husnuzzan kelas X
PPT agama husnuzzan kelas XPPT agama husnuzzan kelas X
PPT agama husnuzzan kelas X
 
PPT Kewarganegaraan penegakan HAM kelas X
PPT Kewarganegaraan penegakan HAM kelas XPPT Kewarganegaraan penegakan HAM kelas X
PPT Kewarganegaraan penegakan HAM kelas X
 
Power point biologi organ dan sistem organ kelas XI
Power point biologi organ dan sistem organ kelas XIPower point biologi organ dan sistem organ kelas XI
Power point biologi organ dan sistem organ kelas XI
 
Azure Bootcamp Louisville - Windows azurewebsites
Azure Bootcamp Louisville - Windows azurewebsitesAzure Bootcamp Louisville - Windows azurewebsites
Azure Bootcamp Louisville - Windows azurewebsites
 

Similar to High Performance Session Checks

Arm html5 presentation
Arm html5 presentationArm html5 presentation
Arm html5 presentation
Ian Renyard
 
Developing the unknown
Developing the unknownDeveloping the unknown
Developing the unknown
paul22blue
 

Similar to High Performance Session Checks (20)

Nodejs
NodejsNodejs
Nodejs
 
Node js
Node jsNode js
Node js
 
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2
 
MongoDB World 2016: Get MEAN and Lean with MongoDB and Kubernetes
MongoDB World 2016: Get MEAN and Lean with MongoDB and KubernetesMongoDB World 2016: Get MEAN and Lean with MongoDB and Kubernetes
MongoDB World 2016: Get MEAN and Lean with MongoDB and Kubernetes
 
Nodejs overview
Nodejs overviewNodejs overview
Nodejs overview
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
"High-load is at the intersection of DevOps and PHP development",
"High-load is at the intersection of DevOps and PHP development", "High-load is at the intersection of DevOps and PHP development",
"High-load is at the intersection of DevOps and PHP development",
 
Meteor - The next generation software stack
Meteor - The next generation software stackMeteor - The next generation software stack
Meteor - The next generation software stack
 
The Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorThe Next Generation Software Stack: Meteor
The Next Generation Software Stack: Meteor
 
A New Transactional Model - Keith Bostic
A New Transactional Model - Keith BosticA New Transactional Model - Keith Bostic
A New Transactional Model - Keith Bostic
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshell
 
Lowering the Barrier to Stream Processing With Alex Morley | Current 2022
Lowering the Barrier to Stream Processing With Alex Morley | Current 2022Lowering the Barrier to Stream Processing With Alex Morley | Current 2022
Lowering the Barrier to Stream Processing With Alex Morley | Current 2022
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
Introduction to Node.JS
Introduction to Node.JSIntroduction to Node.JS
Introduction to Node.JS
 
Arm html5 presentation
Arm html5 presentationArm html5 presentation
Arm html5 presentation
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
 
Developing the unknown
Developing the unknownDeveloping the unknown
Developing the unknown
 
From PHP to React - case study
From PHP to React - case studyFrom PHP to React - case study
From PHP to React - case study
 

Recently uploaded

Recently uploaded (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 

High Performance Session Checks

  • 1. HIGH PERFORMANCE SESSION CHECKS Mikael Lindström Schibsted Payment
  • 2. WHAT IS OUR SESSION CHECKS?     Javascript SDK send a session check request SPiD backend extracts the cookie Fetches session, client and user objects from MongoDB Business logic validates the session and checks that the client has access to the user  Updates the session timestamp in MongoDB  Returns some json data in a jsonp container
  • 3. OLD IMPLEMENTATION  PHP - implementation  MongoDB – sessions and clients
  • 4. PROBLEM  Our PHP implementation does a lot of bootstrapping  Loads and initiates unnecessary functionality for each request  Huge amount of requests to this specific endpoint becomes a bottleneck  Potentially called for each pageview on our clients.
  • 5. NEW IMPLEMENTATION  Nginx – ssl termination  Node.js – implementation  MongoDB – sessions and clients
  • 6. TEST MACHINE     HP gen 8 blade 14 node worker processes 14 nginx processes MongoDB session database  Testing using LoadImpact (loadimpact.com)
  • 7. RESULTS  20 minutes  7 million requests  36 cups of coffee
  • 8. PROBLEMS     Reading PHP sessions in node is hard Cluster module unstable Callback hell Some modules we used was a bit unstable
  • 9. CONCLUSION  Solution was more complex than we initially thought. We could have benefitted from a framework.  Callbacks vs promises and yields  Huge performance increase  Bottleneck today is Nginx (ssl termination)  ssl termination in Load Balancer