Podcast
Questions and Answers
What happens to latency when the requests per second increase?
What happens to latency when the requests per second increase?
What can cause high percentile latencies?
What can cause high percentile latencies?
What is the purpose of using load testing tools like JMeter and Gatling?
What is the purpose of using load testing tools like JMeter and Gatling?
What do histograms and heat maps help track in relation to latency?
What do histograms and heat maps help track in relation to latency?
Signup and view all the answers
What does MTTR measure?
What does MTTR measure?
Signup and view all the answers
Why is reducing the MTTR crucial to improving availability?
Why is reducing the MTTR crucial to improving availability?
Signup and view all the answers
What is the purpose of the Protocol Manager in Uber's API gateway?
What is the purpose of the Protocol Manager in Uber's API gateway?
Signup and view all the answers
Which layer of the API gateway contains functions like authentication, authorization, rate limiting, and monitoring?
Which layer of the API gateway contains functions like authentication, authorization, rate limiting, and monitoring?
Signup and view all the answers
What is the role of the Endpoint Handler in Uber's API gateway?
What is the role of the Endpoint Handler in Uber's API gateway?
Signup and view all the answers
Which layer is responsible for making the actual calls to backend microservices in Uber's API gateway?
Which layer is responsible for making the actual calls to backend microservices in Uber's API gateway?
Signup and view all the answers
In Uber's API gateway, where does the gateway have to deal with different types of protocol payloads like JSON, Thrift, Protobuf?
In Uber's API gateway, where does the gateway have to deal with different types of protocol payloads like JSON, Thrift, Protobuf?
Signup and view all the answers
Which layer of Uber's API gateway adds new middleware functions through a user interface?
Which layer of Uber's API gateway adds new middleware functions through a user interface?
Signup and view all the answers
What is the purpose of the partitioning function in the MapReduce process?
What is the purpose of the partitioning function in the MapReduce process?
Signup and view all the answers
How does the default partitioning function typically work in MapReduce?
How does the default partitioning function typically work in MapReduce?
Signup and view all the answers
What happens after the master assigns reduce tasks to workers in MapReduce?
What happens after the master assigns reduce tasks to workers in MapReduce?
Signup and view all the answers
Why might a user want to provide their own partitioning function in MapReduce?
Why might a user want to provide their own partitioning function in MapReduce?
Signup and view all the answers
What is the main purpose of the Reduce function in MapReduce?
What is the main purpose of the Reduce function in MapReduce?
Signup and view all the answers
After completing all map and reduce tasks, what action does the master take in MapReduce?
After completing all map and reduce tasks, what action does the master take in MapReduce?
Signup and view all the answers
What strategy did Robinhood implement to handle the significant increase in system requests?
What strategy did Robinhood implement to handle the significant increase in system requests?
Signup and view all the answers
What is the purpose of the Routing Layer in Robinhood's infrastructure?
What is the purpose of the Routing Layer in Robinhood's infrastructure?
Signup and view all the answers
What is the main function of the Aggregation Layer in Robinhood's system?
What is the main function of the Aggregation Layer in Robinhood's system?
Signup and view all the answers
How did Robinhood make their system horizontally scalable?
How did Robinhood make their system horizontally scalable?
Signup and view all the answers
Why does Robinhood split up their large dataset into smaller partitions?
Why does Robinhood split up their large dataset into smaller partitions?
Signup and view all the answers
What is a key feature of Erlang according to the text?
What is a key feature of Erlang according to the text?
Signup and view all the answers
Which platform is mentioned as a collection of middleware, libraries, and tools for Erlang?
Which platform is mentioned as a collection of middleware, libraries, and tools for Erlang?
Signup and view all the answers
What role does each shard play in Robinhood's infrastructure?
What role does each shard play in Robinhood's infrastructure?
Signup and view all the answers
What is Mnesia in relation to Erlang?
What is Mnesia in relation to Erlang?
Signup and view all the answers
Why is Erlang described as requiring getting used to if you're unfamiliar with the paradigm?
Why is Erlang described as requiring getting used to if you're unfamiliar with the paradigm?
Signup and view all the answers
What benefit does Erlang bring in terms of code updating without application restarts?
What benefit does Erlang bring in terms of code updating without application restarts?
Signup and view all the answers
Which OS is mentioned as being used by WhatsApp for their servers?
Which OS is mentioned as being used by WhatsApp for their servers?
Signup and view all the answers
Study Notes
Scalability and Latency
- As requests per second increase, latency also increases until autoscaling kicks in and more machines are added to the server pool.
- Load testing tools like JMeter and Gatling can be used to stress test the backend and measure average and percentile latencies.
- High percentile latencies (e.g. 99.9% or 99.99% of all responses) may be important to measure, depending on the application.
Measuring Latency
- Histograms and heat maps are commonly used to track tail latencies.
- Tail latencies can be caused by network congestion, garbage collection pauses, packet loss, contention, and more.
Other Metrics
- Mean Time to Recovery (MTTR) measures the average time it takes to repair a failed system.
- Mean Time Between Maintenance (MTBM) measures the average time between maintenance activities on a system.
API Gateway
- Uber's API gateway handles data payloads across multiple protocols and client device types.
- The gateway has several layers: Protocol Manager, Middleware, Endpoint Handler, and Requests to Backend Services.
- The Protocol Manager translates protocol payloads like JSON, Thrift, and Protobuf.
- Middleware functions include authentication, authorization, rate limiting, logging, and monitoring.
- The Endpoint Handler validates requests and transforms them for backend services.
Erlang
- Erlang is a functional language designed for concurrency and fault tolerance.
- It has high developer productivity and concise code.
- Erlang allows for hot-swapping code without restarting the application.
- WhatsApp uses Erlang for their backend, which enables quick iteration and long uptimes.
FreeBSD
- WhatsApp uses FreeBSD as their operating system due to the founders' experience at Yahoo.
- FreeBSD is used extensively in WhatsApp's servers.
MapReduce
- The map phase partitions intermediate key/value pairs into R regions using a partitioning function.
- The master assigns reduce tasks to workers and notifies them of the storage locations for their assigned key/value pairs.
- Reduce workers read intermediate key/value pairs, sort them, and pass them to the user's Reduce function.
Robinhood's Scalability
- In 2019, Robinhood's system received 100k requests per second at peak time, increasing to 750k requests per second in 2020.
- To respond to this growth, Robinhood implemented sharding at the application layer to make their brokerage infrastructure horizontally scalable.
- Sharding involves splitting a large dataset into smaller partitions (shards) with each shard having its own application servers, database, and deployment pipeline.
- Robinhood built a routing layer to route external API requests to the correct shards and an aggregation layer to enable internal API traffic.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Learn about the features and advantages of Erlang programming language, designed for concurrency and fault tolerance, with high developer productivity. Understand how Erlang's functional nature and concise syntax contribute to its power. Explore the Open Telecom Platform (OTP) as part of Erlang's ecosystem.