SlideShare a Scribd company logo
Magical User Experiences On
Cellular Mobile Networks
Marketplace Platform
❏ Madan Thangavelu
❏ Nilesh Mahajan
01 Introduction to Uber’s Marketplace Platform
02 Uber app experience challenges
03 How did we solve these problems?
04 Insights
Agenda
Introduction to
Marketplace
Platform
Team
Goal
Extensible platform for reliably
moving people and things
Real-Time
Communications
Geographical
Awareness
High Global
Availability
Logistics
Modeling
Open Platform
Development
Problem areas we work on
“Building
systems at
Uber-scale”
Rider/Core Flow
Home Enter Destination Request Ride Dispatch Driver Enroute
Shopping Ordering Processing Fulfilling
State Machines
Rider State Machine Driver State Machine
Synchronize
Rider State Machine Driver State Machine
Uber App Experience Challenges
● Time-to-launch app critical on 3G or slower networks
● Synchronize across multiple apps (driver, rider)
● Over tens of parallel RPC request to load various
features at app launch, all competing for resources
● Network used is usually cellular and not WiFi
● Polling is expensive
● Polling payloads change less frequently
● Best polling frequency of N second.
● Higher data consumption
How did we solve
these problems?
Key Choices
● Moving from sync to async architecture
○ Use of reactive pattern inside apps
○ Reducing blocking network call dependencies
● Reduce client-server interactions
○ Moving from poll to push
Components of a Push System
Trigger Service API Layer Push Server App
Pushes
consumer
When to Push? What to Push? How to Push?Triggers
Push Protocols
Long Polling
● Work with our HTTP proxies
● Available in browsers
● Simple client implementations
Server Sent Events
● SSE has fewer reconnect roundtrips,
● Lower latency
Client Server
CONTINUE
CONNECT
MSG
45 Sec
MSG
CONNECT
CONNECT
CONNECT
Client Server
CONNECT
MSG
MSG
MSG
MSG
Long Polling Server Sends Events
Leveraging Server Sent Events
● Advantages
○ Simple to implement and understand
○ Works on top of HTTP
● Challenges
○ Unidirectional
○ No Visibility
○ Hard to detect broken connections
Introducing Ramen
● Real-time Asynchronous MEssaging Network
● HTTP SSE-based push protocol
● Ensures at least once delivery of a push message
● Optimizes amount of data transfer
Ramen Protocol
App Ramen Server
/connect?seq=0
Message1,seq=1
Message2,seq=2
/connect?seq=2
Message3,seq=3
Message3,seq=3
Ramen
Session
Connect
Reconnect
HTTP 200 (text/event-stream)
HTTP 200 (text/event-stream)
Ack seq=2
Ramen Protocol continued..
● Heartbeats every 5 seconds to detect connection failure
● Message acknowledgement every 30 seconds
● Push message wire priority
○ High
○ Medium
○ Low
How speed up app launch?
● App launch process
○ App establishes a Ramen connection with server
○ App make one request to backend - /app/launch
■ Endpoint returns 1 MTU (1500 bytes)-sized response
■ /app/launch also acts as a async trigger to our push systems
○ Based on back-end user state, server generates tens of pushes
○ Pushes are sent on Ramen connection by their priority
○ Based on data in push, experience is rendered on the mobile side
Network Pattern
App API
Gateway
App
API
Gateway
Push
Server
Ramen
Pushes
High
Medium
Low
Trigger
/app/launch
connect
Before After
60% reduction
26% reduction
89% reduction
78% reduction
vs Poll :
vs Ramen v1 :
P99
End-to-End Latency
How did we make the entire app more
responsive?
● App launch process
○ App establishes a Ramen connection with server
● On any state machine change
○ Kafka events trigger the push systems
○ Based on type of event and backend state, pushes are generated
○ Pushes are sent over the Ramen connection
● All polling calls were changed to push
● Larger pushes were broken down to smaller pushes
● Enforcement and education about payload sizes
Concurrent Connections
1M+
Types of apps
20+ Messages Streamed Per
Second
100K+
Messages Delivered for
Driver app
99%
Rider
Driver
Uber Lite
Uber Eats
Restaurants
Uber Fleet
Uber Freight
Web
Jump Bikes
Insights
Thank you !
Proprietary and confidential © 2019 Uber Technologies, Inc. All rights reserved. No part of this document may be reproduced or utilized in any
form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval systems, without
permission in writing from Uber. This document is intended only for the use of the individual or entity to whom it is addressed and contains
information that is privileged, confidential or otherwise exempt from disclosure under applicable law. All recipients of this document are notified
that the information contained herein includes proprietary and confidential information of Uber, and recipient may not make use of, disseminate,
or in any way disclose this document or any of the enclosed information to any person other than employees of addressee to the extent
necessary for consultations with authorized personnel of Uber.
Gids conference-talk-2019-madan-thangavelu

More Related Content

Similar to Gids conference-talk-2019-madan-thangavelu

Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk
 
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
AgileNetwork
 
What’s New: Splunk App for Stream and Splunk MINT
What’s New: Splunk App for Stream and Splunk MINTWhat’s New: Splunk App for Stream and Splunk MINT
What’s New: Splunk App for Stream and Splunk MINT
Splunk
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Lucian Neghina
 
Problem definition
Problem definitionProblem definition
Problem definition
balamurugan.k Kalibalamurugan
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
APNIC
 
Data Aggregation At Scale Using Apache Flume
Data Aggregation At Scale Using Apache FlumeData Aggregation At Scale Using Apache Flume
Data Aggregation At Scale Using Apache Flume
Arvind Prabhakar
 
Splunk MINT and Stream Breakout
Splunk MINT and Stream BreakoutSplunk MINT and Stream Breakout
Splunk MINT and Stream Breakout
Splunk
 
#1922 rest-push2 ap-im-v6
#1922 rest-push2 ap-im-v6#1922 rest-push2 ap-im-v6
#1922 rest-push2 ap-im-v6
Jack Carnes
 
Network characteristics of the cloud
Network characteristics of the cloudNetwork characteristics of the cloud
Network characteristics of the cloud
Cloud Genius
 
Emergency ambulance portal-PPT-3g2pqy.pptx
Emergency ambulance portal-PPT-3g2pqy.pptxEmergency ambulance portal-PPT-3g2pqy.pptx
Emergency ambulance portal-PPT-3g2pqy.pptx
dragonaklevel7
 
From reactive to proactive mobile scenarios
From reactive to proactive mobile scenariosFrom reactive to proactive mobile scenarios
From reactive to proactive mobile scenarios
Michel de Goede
 
Kochi mulesoft meetup 02
Kochi mulesoft meetup 02Kochi mulesoft meetup 02
Kochi mulesoft meetup 02
sumitahuja94
 
AppNeura
AppNeuraAppNeura
appNeura - DEM User Digital Experience
appNeura - DEM User Digital ExperienceappNeura - DEM User Digital Experience
appNeura - DEM User Digital Experience
Bhupesh Gupta
 
Telco industry
Telco industryTelco industry
Telco industry
Santiago Rudnick
 
How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009
How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009
How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009
anand chandrasekaran
 
Online voting system presentation slide (1)
Online voting system presentation slide (1)Online voting system presentation slide (1)
Online voting system presentation slide (1)
wasi0013
 
Consumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanConsumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With Postman
Postman
 
E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...
E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...
E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...
E-Commerce Berlin EXPO
 

Similar to Gids conference-talk-2019-madan-thangavelu (20)

Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
Splunk MINT for Mobile Intelligence and Splunk App for Stream for Enhanced Op...
 
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
 
What’s New: Splunk App for Stream and Splunk MINT
What’s New: Splunk App for Stream and Splunk MINTWhat’s New: Splunk App for Stream and Splunk MINT
What’s New: Splunk App for Stream and Splunk MINT
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Problem definition
Problem definitionProblem definition
Problem definition
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Data Aggregation At Scale Using Apache Flume
Data Aggregation At Scale Using Apache FlumeData Aggregation At Scale Using Apache Flume
Data Aggregation At Scale Using Apache Flume
 
Splunk MINT and Stream Breakout
Splunk MINT and Stream BreakoutSplunk MINT and Stream Breakout
Splunk MINT and Stream Breakout
 
#1922 rest-push2 ap-im-v6
#1922 rest-push2 ap-im-v6#1922 rest-push2 ap-im-v6
#1922 rest-push2 ap-im-v6
 
Network characteristics of the cloud
Network characteristics of the cloudNetwork characteristics of the cloud
Network characteristics of the cloud
 
Emergency ambulance portal-PPT-3g2pqy.pptx
Emergency ambulance portal-PPT-3g2pqy.pptxEmergency ambulance portal-PPT-3g2pqy.pptx
Emergency ambulance portal-PPT-3g2pqy.pptx
 
From reactive to proactive mobile scenarios
From reactive to proactive mobile scenariosFrom reactive to proactive mobile scenarios
From reactive to proactive mobile scenarios
 
Kochi mulesoft meetup 02
Kochi mulesoft meetup 02Kochi mulesoft meetup 02
Kochi mulesoft meetup 02
 
AppNeura
AppNeuraAppNeura
AppNeura
 
appNeura - DEM User Digital Experience
appNeura - DEM User Digital ExperienceappNeura - DEM User Digital Experience
appNeura - DEM User Digital Experience
 
Telco industry
Telco industryTelco industry
Telco industry
 
How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009
How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009
How Developers can Capitalize on the coming Mobile Data Tsunami - Openwave 2009
 
Online voting system presentation slide (1)
Online voting system presentation slide (1)Online voting system presentation slide (1)
Online voting system presentation slide (1)
 
Consumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With PostmanConsumer-Driven Contract Testing With Postman
Consumer-Driven Contract Testing With Postman
 
E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...
E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...
E-commerce Berlin Expo 2017 - AMP and Progressive Web Apps – Start Fast, Stay...
 

Recently uploaded

Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
bjmsejournal
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
gaafergoudaay7aga
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 

Recently uploaded (20)

Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 

Gids conference-talk-2019-madan-thangavelu

  • 1.
  • 2. Magical User Experiences On Cellular Mobile Networks Marketplace Platform ❏ Madan Thangavelu ❏ Nilesh Mahajan
  • 3. 01 Introduction to Uber’s Marketplace Platform 02 Uber app experience challenges 03 How did we solve these problems? 04 Insights Agenda
  • 5. Goal Extensible platform for reliably moving people and things
  • 8. Rider/Core Flow Home Enter Destination Request Ride Dispatch Driver Enroute Shopping Ordering Processing Fulfilling
  • 9. State Machines Rider State Machine Driver State Machine
  • 10. Synchronize Rider State Machine Driver State Machine
  • 11. Uber App Experience Challenges ● Time-to-launch app critical on 3G or slower networks ● Synchronize across multiple apps (driver, rider) ● Over tens of parallel RPC request to load various features at app launch, all competing for resources ● Network used is usually cellular and not WiFi ● Polling is expensive ● Polling payloads change less frequently ● Best polling frequency of N second. ● Higher data consumption
  • 12. How did we solve these problems?
  • 13. Key Choices ● Moving from sync to async architecture ○ Use of reactive pattern inside apps ○ Reducing blocking network call dependencies ● Reduce client-server interactions ○ Moving from poll to push
  • 14. Components of a Push System Trigger Service API Layer Push Server App Pushes consumer When to Push? What to Push? How to Push?Triggers
  • 15. Push Protocols Long Polling ● Work with our HTTP proxies ● Available in browsers ● Simple client implementations Server Sent Events ● SSE has fewer reconnect roundtrips, ● Lower latency Client Server CONTINUE CONNECT MSG 45 Sec MSG CONNECT CONNECT CONNECT Client Server CONNECT MSG MSG MSG MSG Long Polling Server Sends Events
  • 16. Leveraging Server Sent Events ● Advantages ○ Simple to implement and understand ○ Works on top of HTTP ● Challenges ○ Unidirectional ○ No Visibility ○ Hard to detect broken connections
  • 17. Introducing Ramen ● Real-time Asynchronous MEssaging Network ● HTTP SSE-based push protocol ● Ensures at least once delivery of a push message ● Optimizes amount of data transfer
  • 18. Ramen Protocol App Ramen Server /connect?seq=0 Message1,seq=1 Message2,seq=2 /connect?seq=2 Message3,seq=3 Message3,seq=3 Ramen Session Connect Reconnect HTTP 200 (text/event-stream) HTTP 200 (text/event-stream) Ack seq=2
  • 19. Ramen Protocol continued.. ● Heartbeats every 5 seconds to detect connection failure ● Message acknowledgement every 30 seconds ● Push message wire priority ○ High ○ Medium ○ Low
  • 20. How speed up app launch? ● App launch process ○ App establishes a Ramen connection with server ○ App make one request to backend - /app/launch ■ Endpoint returns 1 MTU (1500 bytes)-sized response ■ /app/launch also acts as a async trigger to our push systems ○ Based on back-end user state, server generates tens of pushes ○ Pushes are sent on Ramen connection by their priority ○ Based on data in push, experience is rendered on the mobile side
  • 22. 60% reduction 26% reduction 89% reduction 78% reduction vs Poll : vs Ramen v1 : P99 End-to-End Latency
  • 23. How did we make the entire app more responsive? ● App launch process ○ App establishes a Ramen connection with server ● On any state machine change ○ Kafka events trigger the push systems ○ Based on type of event and backend state, pushes are generated ○ Pushes are sent over the Ramen connection ● All polling calls were changed to push ● Larger pushes were broken down to smaller pushes ● Enforcement and education about payload sizes
  • 24. Concurrent Connections 1M+ Types of apps 20+ Messages Streamed Per Second 100K+ Messages Delivered for Driver app 99% Rider Driver Uber Lite Uber Eats Restaurants Uber Fleet Uber Freight Web Jump Bikes Insights
  • 26. Proprietary and confidential © 2019 Uber Technologies, Inc. All rights reserved. No part of this document may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval systems, without permission in writing from Uber. This document is intended only for the use of the individual or entity to whom it is addressed and contains information that is privileged, confidential or otherwise exempt from disclosure under applicable law. All recipients of this document are notified that the information contained herein includes proprietary and confidential information of Uber, and recipient may not make use of, disseminate, or in any way disclose this document or any of the enclosed information to any person other than employees of addressee to the extent necessary for consultations with authorized personnel of Uber.