•Harsh Desai, Gaurav Yadav, Sahil Jindal, Satyam Shubham, Mahip Jain, Anshal Shukla, Ashok Varma•13 min read•advanced•
--
•View OriginalOverview
The article discusses the implementation of a Unified Session for analytical events at Uber, aimed at enhancing data consistency and analytics across various applications. It outlines the challenges faced with previous session definitions and how the new architecture improves scalability, extensibility, and fault tolerance.
What You'll Learn
1
How to implement a Unified Session architecture for cross-domain analytics
2
Why a single session definition improves data consistency across applications
3
How to design scalable backend services for session management
Prerequisites & Requirements
- Understanding of session management concepts
- Experience with backend service architecture(optional)
Key Questions Answered
What are the main challenges of implementing a Unified Session at Uber?
The main challenges include creating an extensible session definition that integrates with multiple marketplace signals, ensuring scalability for Uber's high traffic, and managing a smooth migration of the data lake without disrupting existing data pipelines.
How does the Unified Session architecture improve analytics at Uber?
The Unified Session architecture allows for a single session ID to link events from both mobile and backend systems, facilitating better cross-domain analytics and consistent metrics across different applications like Uber Rides and Uber Eats.
What is the role of the session-manager and session-gateway services?
The session-manager service is responsible for creating and updating sessions in real-time, while the session-gateway provides quick lookups for existing sessions, ensuring low latency and efficient session management.
What strategies were used for resilient recovery in the session management system?
To ensure resilient recovery, Uber developed a contingency platform that includes Session Recreation and Session Patching, which infers Unified Session IDs from logs and updates downstream tables accordingly.
Key Statistics & Figures
Monthly active users
131 Million
Uber's platform supports this vast user base with efficient session management.
Daily unique sessions
45 Million
This volume necessitates a robust and scalable session management system.
Average mobile events per day
72K million
Each event needs to be tagged with a unique Session ID for accurate analytics.
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Database
Redis
Used for caching session information to improve lookup speed.
Data Processing
Apache Hive
Utilized for generating tables with Unified Session IDs and metadata.
Tracing
Jaeger
Helps propagate session information across microservices.
Key Actionable Insights
1Implementing a Unified Session architecture can significantly enhance data consistency across applications.This approach allows for a single view of user interactions, which is crucial for accurate analytics and decision-making in a multi-application environment.
2Designing scalable backend services is essential for handling high traffic, especially in applications like Uber.By breaking down session management into dedicated services, Uber can efficiently manage up to 250K queries per second, ensuring responsiveness and reliability.
3Utilizing a cookie for session management can reduce backend calls and improve performance.This optimization minimizes the load on session management services and enhances the overall user experience by decreasing latency.
Common Pitfalls
1
Failing to synchronize session ID definitions across different applications can lead to inconsistent analytics.
When different teams use varying definitions for session IDs, it complicates cross-application analysis and can result in misleading metrics.
2
Not planning for a seamless migration can disrupt data pipelines.
Altering fundamental concepts like session IDs requires careful planning to avoid breaking existing data relationships and analytics.
Related Concepts
Session Management
Data Consistency
Microservices Architecture
Scalable Backend Design