SlideShare ist ein Scribd-Unternehmen logo
1 von 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?

Weitere ähnliche Inhalte

Was ist angesagt?

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/placeFastly
 
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 ApplicationsRick Beerendonk
 
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...MarcelLanz
 
Go & microservices
Go & microservicesGo & microservices
Go & microservicesHiraq Citra M
 
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/2013Valeri Karpov
 
eZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content PublishingeZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content PublishingBertrand Dunogier
 
What we do with Go
What we do with GoWhat we do with Go
What we do with GoMarcelLanz
 
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...Codemotion
 
Extending GWT
Extending GWTExtending GWT
Extending GWTisurusndr
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web VitalsSamar Panda
 
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 NYCFastly
 
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.pdfKnoldus Inc.
 
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 ScaleFastly
 
Node.js Blockchain Implementation
Node.js Blockchain ImplementationNode.js Blockchain Implementation
Node.js Blockchain ImplementationGlobalLogic Ukraine
 

Was ist angesagt? (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
 

Andere mochten auch

Azure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAzure Bootcamp Louisville - Node js presentation
Azure Bootcamp Louisville - Node js presentationAndrea Walker
 
Azure Bootcamp Louisville - Service bus
Azure Bootcamp Louisville - Service busAzure Bootcamp Louisville - Service bus
Azure Bootcamp Louisville - Service busAndrea Walker
 
Medical devices introduction
Medical devices introductionMedical devices introduction
Medical devices introductionSigma
 
Power point Struktur dinding sel mikroba
Power point Struktur dinding sel mikrobaPower point Struktur dinding sel mikroba
Power point Struktur dinding sel mikrobaLatifa 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 nilLatifa Syifa
 
Power point Sejarah Peradaban Yunani
Power point Sejarah Peradaban YunaniPower point Sejarah Peradaban Yunani
Power point Sejarah Peradaban YunaniLatifa Syifa
 
PPT agama husnuzzan kelas X
PPT agama husnuzzan kelas XPPT agama husnuzzan kelas X
PPT agama husnuzzan kelas XLatifa Syifa
 
PPT Kewarganegaraan penegakan HAM kelas X
PPT Kewarganegaraan penegakan HAM kelas XPPT Kewarganegaraan penegakan HAM kelas X
PPT Kewarganegaraan penegakan HAM kelas XLatifa 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 XILatifa Syifa
 
Azure Bootcamp Louisville - Windows azurewebsites
Azure Bootcamp Louisville - Windows azurewebsitesAzure Bootcamp Louisville - Windows azurewebsites
Azure Bootcamp Louisville - Windows azurewebsitesAndrea Walker
 

Andere mochten auch (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
 

Ähnlich wie High Performance Session Checks

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 DB2Vladimir Bacvanski, PhD
 
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 KubernetesMongoDB
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
"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", Fwdays
 
Meteor - The next generation software stack
Meteor - The next generation software stackMeteor - The next generation software stack
Meteor - The next generation software stackHenrik Ingo
 
The Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorThe Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorMongoDB
 
A New Transactional Model - Keith Bostic
A New Transactional Model - Keith BosticA New Transactional Model - Keith Bostic
A New Transactional Model - Keith BosticMongoDB
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellJeroen Resoort
 
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 2022HostedbyConfluent
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJSHüseyin BABAL
 
Arm html5 presentation
Arm html5 presentationArm html5 presentation
Arm html5 presentationIan Renyard
 
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 AvivRon Perlmuter
 
Developing the unknown
Developing the unknownDeveloping the unknown
Developing the unknownpaul22blue
 
From PHP to React - case study
From PHP to React - case studyFrom PHP to React - case study
From PHP to React - case studySparkbit
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Kürzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

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