QuestionQ37

VerifiedInfrastructure and Automation

A developer builds a REST API running behind a load balancer so that clients can query stock information. The back-end database data is refreshed every 15 minutes, but clients poll the API every 2 minutes. The developer must reduce database load without changing the client side. Which constraint must the engineer address?

Explanation

Cache-Control response headers with an appropriate max-age allow HTTP caches to treat stock-query responses as fresh until the data-refresh interval expires, reducing repeated database access while remaining transparent to clients. HTTP caching defines max-age as a freshness lifetime for cached responses.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!