Redesign a Multi-Tier Web Application for AWS
Compare a local web application with an AWS deployment using API Gateway, S3 and Redis while preserving its read and update behavior.
Problem statement
For this exercise, assume an existing multi-tier web application lets signed-in users read and update their own saved records. Its local version has a static browser frontend, one application server and a PostgreSQL database. Draw those local tiers, then redesign the same application as an AWS cloud-native deployment.
Explain how Redis, S3 and API Gateway improve this design. The saved-record scenario, database choice and numeric targets are practice assumptions; the original candidate's personal application was not described.
Keep the user journey and API behavior. S3 holds versioned static frontend assets, API Gateway is the application API entry, and Redis is a reconstructible read cache. Choose suitable application compute and durable database deployment. The service must check the authenticated record owner on reads and updates.
Updates include an expected record version; a stale update returns a conflict rather than overwriting a newer value. A successful update returns a new version, and the writer's next point read can require at least that version. Other permitted cached reads may be at most 30 seconds stale.
Explain the asset, read and update paths, what each tier owns, and the behavior when Redis or an application instance is unavailable. Cache loss cannot erase records, bypass ownership checks or become permission to accept stale writes.
After the redesign, acknowledged data must survive an application-instance or single availability-zone failure. The deliverable is the architecture comparison and its key trade-offs.
Live database cutover, cross-engine conversion, new business features, file uploads, user-owned binary objects, multi-region operation and microservice decomposition are outside scope.
What to build
- Signed-in users can read and conditionally update their own records through the same logical application contract.
- The AWS design serves versioned frontend assets and routes application reads and updates through clearly owned cloud tiers, explaining S3, API Gateway and Redis.
- The application meets its declared read freshness and data-durability contract, including writer-version reads and explicit degraded behavior when a cache or instance is unavailable.
At scalePractice assumption
- 100,000 active users and one million records using 20 GB; peak traffic is 5,000 point reads and 500 updates per second.
- Healthy reads target 300 ms p95 and updates 700 ms p95; general cached reads may be at most 30 seconds stale, while a writer may request its returned version.
- Acknowledged data survives an application-instance or one availability-zone failure; Redis loss may reduce performance but never weaken record ownership, version checks or durability.