Question

Difficulty: HardPerformance and Scalability Optimization

A global ride-sharing platform is designing a backend for its new real-time driver tracking and rider-matching service. The platform must ingest location telemetry from 600,000600,000 active drivers every 33 seconds (approximately 200,000200,000 write requests per second). Riders will query the database to find the 55 nearest available drivers within a 33-mile radius, requiring sub-1010 millisecond response times. The location telemetry database must scale seamlessly during peak hours without administrative overhead. Which architecture represents the most performant, scalable, and operationally efficient solution to meet these requirements?

  1. Ingest driver telemetry using Amazon Kinesis Data Streams. Process the stream with AWS Lambda and store the location coordinates in an Amazon ElastiCache for Redis cluster with cluster mode enabled. Perform nearby driver searches using Redis geospatial commands (GEOADD and GEORADIUS) against the cluster.Answer
  2. B
    Ingest driver telemetry using Amazon Kinesis Data Streams. Process the stream with AWS Lambda and store the locations in an Amazon ElastiCache for Memcached cluster. Use client-side hashing to partition writes across the nodes and query the nodes to compute distance calculations in the Lambda function.
  3. C
    Ingest driver telemetry using a Network Load Balancer (NLB) routing to an Amazon ECS service on AWS Fargate. Store the coordinates in an Amazon Aurora PostgreSQL database with the PostGIS extension. Configure Aurora Auto Scaling to provision Aurora Replicas to scale the database to support the write throughput.
  4. D
    Ingest driver telemetry using an Application Load Balancer (ALB) routing to an Auto Scaling group of EC2 instances. Write the coordinates to an Amazon ElastiCache for Redis cluster with cluster mode disabled, relying on Application Load Balancer auto-scaling to absorb sudden traffic spikes.

Answer

Ingest driver telemetry using Amazon Kinesis Data Streams, process the stream with AWS Lambda, and store the location coordinates in an Amazon ElastiCache for Redis cluster with cluster mode enabled, performing nearby driver searches using Redis geospatial commands.
The correct architecture uses Amazon Kinesis Data Streams to ingest the telemetry and AWS Lambda to process it. Storing the coordinates in Amazon ElastiCache for Redis with cluster mode enabled allows horizontal scaling of both writes and reads across multiple shards. Redis natively supports geospatial indices and commands (such as GEOADD and GEORADIUS) which provide sub-1010 millisecond latency and satisfy the application's query requirements.

Step-by-Step Solution

1
Analyze the write throughput and scale requirements.
The system must process 200,000200,000 write requests per second, which requires a highly scalable ingestion and storage layer.
Choosing a backend that supports horizontal write scaling is critical to prevent write bottlenecks.
2
Evaluate the database choices for geospatial querying and write throughput.
Amazon ElastiCache for Redis with cluster mode enabled supports sharding (horizontal scaling of writes) and native geospatial commands (GEOADD, GEORADIUS), whereas Memcached lacks geospatial functions and Aurora PostgreSQL cannot scale writes horizontally via read replicas.
This determines the data store that can meet the sub-1010 millisecond latency and scale requirements.
3
Compare ingestion mechanisms for high-throughput stream data.
Amazon Kinesis Data Streams combined with AWS Lambda can efficiently ingest and batch partition the telemetry streams, whereas using an Application Load Balancer without pre-warming for sudden spikes is prone to failure.
Ensuring the ingestion tier matches the backend capacity and handles spikes gracefully.

Key Concept

Scaling database write throughput using Amazon ElastiCache for Redis Cluster mode and native geospatial indexing for low-latency queries.
Rate this question