SlideShare a Scribd company logo
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

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
Fastly
 
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
Rick 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 & microservices
Hiraq 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/2013
Valeri Karpov
 
eZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content PublishingeZ Publish Asynchronous Content Publishing
eZ Publish Asynchronous Content Publishing
Bertrand Dunogier
 
What we do with Go
What we do with GoWhat we do with Go
What we do with Go
MarcelLanz
 
Servicestack
ServicestackServicestack
Servicestack
Giedrius Banaitis
 
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 GWT
isurusndr
 
Nodejs
NodejsNodejs
Nodejs
Prem Sanil
 
Tibco developer
Tibco developerTibco developer
Tibco developer
Ronnie Reddy
 
Demystifying Web Vitals
Demystifying Web VitalsDemystifying Web Vitals
Demystifying Web Vitals
Samar 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 NYC
Fastly
 
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
Knoldus Inc.
 
Ignite Zurich Newsweek
Ignite Zurich   NewsweekIgnite Zurich   Newsweek
Ignite Zurich Newsweek
Meshach Jackson
 
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
Fastly
 
Node.js Blockchain Implementation
Node.js Blockchain ImplementationNode.js Blockchain Implementation
Node.js Blockchain Implementation
GlobalLogic Ukraine
 

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

Scalable Event Tracking
Scalable Event TrackingScalable Event Tracking
Scalable Event Tracking
schibstedpayment
 
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
 
Ser application form offshore
Ser application form offshoreSer application form offshore
Ser application form offshore
Peter Smith-Robinson
 
Ppt whacy presentation_current
Ppt whacy presentation_currentPpt whacy presentation_current
Ppt whacy presentation_current
Africa.Heritage.Tourism
 
WHACY Presentation
WHACY PresentationWHACY Presentation
WHACY Presentation
Africa.Heritage.Tourism
 
Medical devices introduction
Medical devices introductionMedical devices introduction
Medical devices introduction
Sigma
 
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 YunaniLatifa 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 XILatifa 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

Nodejs
NodejsNodejs
Node js
Node jsNode 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
Vladimir 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 Kubernetes
MongoDB
 
Nodejs overview
Nodejs overviewNodejs overview
Nodejs overview
Nicola Del Gobbo
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
Vikash Singh
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
Khaled Mosharraf
 
"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 stack
Henrik Ingo
 
The Next Generation Software Stack: Meteor
The Next Generation Software Stack: MeteorThe Next Generation Software Stack: Meteor
The Next Generation Software Stack: Meteor
MongoDB
 
A New Transactional Model - Keith Bostic
A New Transactional Model - Keith BosticA New Transactional Model - Keith Bostic
A New Transactional Model - Keith Bostic
MongoDB
 
SpringOne 2016 in a nutshell
SpringOne 2016 in a nutshellSpringOne 2016 in a nutshell
SpringOne 2016 in a nutshell
Jeroen 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 2022
HostedbyConfluent
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
Hüseyin BABAL
 
Introduction to Node.JS
Introduction to Node.JSIntroduction to Node.JS
Introduction to Node.JS
Collaboration Technologies
 
Arm html5 presentation
Arm html5 presentationArm html5 presentation
Arm html5 presentation
Ian 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 Aviv
Ron Perlmuter
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
Victor Reyes Heitmann
 
Developing the unknown
Developing the unknownDeveloping the unknown
Developing the unknown
paul22blue
 
From PHP to React - case study
From PHP to React - case studyFrom PHP to React - case study
From PHP to React - case study
Sparkbit
 

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

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 

Recently uploaded (20)

Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 

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