Route Through the App
Easy About 15 min Free with an account
Build a safe three-tier request path that keeps clients away from the database.
The brief
Requirement: Keep untrusted clients off your database. Wiring the client straight to the database makes a quick demo work, but it ships database credentials and schema onto every device and leaves nowhere to enforce authorization or rate limits.
The pattern: Put a trusted app service between the client and the database. The client calls the service, and only the service touches the data, so the database stays private and free to change without forcing every client to change with it.
This first challenge is intentionally small. It establishes the protected service boundary that the later challenges will scale, cache, and make asynchronous.
Drag components from the palette, wire them together, then Check your design.
- The design contains an App Service.
- A request can travel Client → App Service → Database.
- The Client never connects directly to the Database.
The topology represents responsibilities and interaction semantics. You do not need to choose a specific web framework, database engine, or wire protocol.
How it is graded
You build the design on a canvas, and Katabench checks the topology against the challenge's design rules.
Related guides
What it practices
- Stateless app tier
- Route clients through a trusted, horizontally scaled app tier behind a load balancer.
Related katas
- Publish the First Post Easy Free with account A social prototype writes posts from the browser and hides follows in a JSON column. Put a trusted Post API in charge, with content in the Post Store and relationships in their own Social Graph.
- Scale the Web Tier Easy Free with account Put a stateless app tier behind a load balancer and remove its single point of failure.
- Accept Notification Requests Easy Pro A campaign tool writes delivery rows from the browser and broken template references explode at send time. Put a Notification API in charge that resolves every template at intake.
- Establish a Chat Session Easy Pro A prototype lets mobile clients write messages straight to storage. Introduce a trusted real-time gateway and chat service before scaling connections.