Cloud concept · Updated

Reverse Proxy - A reverse proxy is an intermediary that receives client requests on behalf of backend servers and forwards those requests to the appropriate backend.

In short

Clients connect to a reverse proxy rather than directly to the servers providing an application or data service. This separation can centralize routing, security, connection management, and failure handling, but the proxy itself must be designed for availability and sufficient capacity.

Cloud Concepts Hub →

6 key aspects of Reverse Proxy

Reverse proxies separate clients from backends while providing protocol-dependent routing, connection management, and security controls that require their own availability and capacity planning.

01
Server-side indirection

Clients use the proxy endpoint rather than individual backend addresses. This allows backend replacement, scaling, and routing changes without requiring clients to track each server.

02
Protocol-specific capabilities

A proxy must support the protocol and behavior of its workload. An HTTP proxy can inspect paths and headers, while a database proxy manages database sessions and connections.

03
Resilient routing and proxy availability

Health-aware routing can avoid failed backends, but the proxy tier must also survive failures. Use redundant deployment across failure domains and test backend failure, proxy failure, and connection recovery separately.

04
Connection management

Connection reuse and pooling can reduce backend connection overhead. Session state, long-running transactions, and connection pinning can limit these benefits, so validate behavior with realistic workloads.

05
Controlled security boundary

A reverse proxy can centralize TLS handling and supported access controls. Prevent direct backend access where appropriate, and configure backend encryption and forwarded-header trust explicitly.

06
Failure and capacity limits

A proxy adds its own latency, quotas, timeouts, and resource limits. It does not eliminate backend failures or make interrupted operations safe to retry.

Cloud services for Reverse Proxy

A web application can place CloudFront in front of an Application Load Balancer, which routes requests to healthy application targets across Availability Zones. The application can use RDS Proxy separately for pooled access to a supported database; the HTTP and database proxies solve different problems. API Gateway can instead provide the API-facing layer when its authorization, throttling, and integration capabilities fit the workload. These services need not all appear in one architecture. Choose each proxy for its protocol and responsibilities, then coordinate timeouts, access restrictions, monitoring, and retry behavior across the complete request path.

Amazon RDS Proxy

A managed database proxy for supported Amazon RDS and Amazon Aurora databases that pools and reuses database connections. It helps manage connection surges and database failover, but session pinning can reduce pooling efficiency and interrupted transactions still require application-level handling.

Amazon CloudFrontAmazon CloudFront

Acts as an edge reverse proxy for HTTP and HTTPS origins and can cache eligible responses to reduce origin traffic. Cache policies must distinguish public content from user-specific responses, and private-origin access controls depend on the origin type.

Amazon API GatewayAmazon API Gateway

Provides a managed API front end that can forward requests to backend integrations. Depending on the API type and configuration, it adds controls such as authorization, throttling, and request transformation rather than merely relaying traffic.

Reverse Proxy exam questions

Real practice exam questions on Reverse Proxy, with the correct answer and its explanation. Answer them with every option in the exam simulator.

SAA-C03

A company exposes a REST API through a managed HTTP proxy layer. An internal Application Load Balancer routes requests to application instances across two Availability Zones. The API has a checkout method and a computationally expensive report-generation method. During bursts of report requests from many clients, application instances become overloaded and checkout requests fail.

Load tests show that the backend can reliably handle the expected checkout traffic together with 100 report requests per second and a small burst of additional report requests. The company wants a managed, best-effort mechanism to reject excess report requests before they reach the backend without imposing the same low request limit on checkout traffic. Clients must continue receiving synchronous responses, and application code cannot change. Account-level service quotas have sufficient headroom.

Which solution best meets these requirements?

Show answerCORRECT ANSWER

Use an Amazon API Gateway REST API with an HTTP proxy integration to the backend. Configure a stage-level method throttling override for report generation with a rate of 100 requests per second and a small burst limit. Keep a higher throttle setting for checkout.

API Gateway can act as a managed reverse proxy and apply method-specific throttling before forwarding requests. The report method's rate and burst settings provide best-effort protection against overload while allowing checkout to retain a higher limit. API Gateway throttling is not a guaranteed hard ceiling, which is consistent with the requirement.

ANS-C01

A company is replacing an internet-facing application gateway with a managed load balancer. Customers connect directly to the gateway over HTTPS using IPv4 or IPv6. The application runs on IPv4-only EC2 instances in private subnets across two Availability Zones and accepts HTTP on port 8080. TLS must terminate at the load balancer.

Security auditors require the application to record the actual client IP address, including IPv6 addresses. Clients might deliberately submit forged X-Forwarded-For headers. The application can be configured to extract an address from a specified position in that header or to record the TCP peer address, but it cannot decode Proxy Protocol. No additional proxy tier can be deployed. Application security groups must prevent clients from bypassing the load balancer.

Which configuration meets all requirements?

Show answerCORRECT ANSWER

Deploy a dual-stack Application Load Balancer with an HTTPS listener and an HTTP target group using IPv4 targets. Use X-Forwarded-For append mode and configure the application to record the rightmost address. Allow port 8080 on the application security group only from the load balancer's security group.

The ALB terminates client TLS and establishes separate HTTP connections to the IPv4 targets, supporting both IPv4 and IPv6 clients. In append mode, it adds the address of its client to the end of X-Forwarded-For. Because customers connect directly to the ALB, the rightmost address is the actual client address even when the client supplies forged preceding values. Referencing the ALB security group restricts backend access to the trusted proxy path.

Practice Reverse Proxy in a full exam

Questions on Reverse Proxy in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Reverse Proxy

2 min read

A reverse proxy represents backend servers to their clients. A client connects to the proxy's endpoint, and the proxy communicates with an appropriate backend on the client's behalf. This differs from a forward proxy, which represents clients when they access other systems. Reverse proxies are commonly associated with HTTP applications, but the server-side proxy pattern also applies to database protocols and other network services.

In cloud architectures, a reverse proxy provides a stable access point while backend instances, containers, or database roles change. An HTTP reverse proxy might route requests for one hostname to a web application and requests under an API path to a separate service. Depending on its capabilities, it can terminate TLS, authenticate requests, cache responses, or distribute traffic among healthy targets. These are optional capabilities, not properties of every reverse proxy.

For high availability, deploy the proxy tier across independent failure domains and provide healthy backends in multiple Availability Zones. A single proxy virtual machine can become a single point of failure even when many application servers sit behind it. Health checks should reflect whether a backend can serve useful requests, and connection-draining settings should allow suitable time for in-progress work during deployments. A proxy cannot compensate for an unavailable dependency that has no functioning replacement.

Database proxies illustrate why proxy concepts extend beyond web traffic. Amazon RDS Proxy maintains a pool of database connections that applications can share, reducing connection-establishment overhead and helping absorb connection spikes from workloads such as AWS Lambda. It can direct connections to a new database writer during supported failover scenarios. This improves connection handling and recovery behavior, but does not create database replicas, increase database compute capacity, or guarantee that an in-flight transaction succeeds.

Connection pooling also has limits. Transactions and session-specific state can require a client to remain associated with one database connection, reducing opportunities to share connections. Engineers should monitor connection utilization, wait times, and session pinning rather than assuming that every application connection can be multiplexed freely. For an exam scenario describing frequent short-lived connections overwhelming an otherwise adequately sized database, a database connection proxy is more relevant than an HTTP load balancer.

The extra network hop introduces latency, cost, configuration complexity, and another capacity boundary. Configure connection limits and timeouts across the client, proxy, and backend so that stalled requests do not accumulate indefinitely. Retries need bounded backoff and awareness of operation semantics: automatically retrying a payment request or database write after an ambiguous failure can duplicate work unless the operation is idempotent.

A reverse proxy is not automatically a cache, firewall, or load balancer, although one implementation may perform several of these roles. TLS termination also does not imply encryption from the proxy to the backend; configure that connection separately when required. Restrict backend access so clients cannot bypass the proxy's controls, and trust forwarded client-identity headers only when they come through a controlled proxy path.

Learn Reverse Proxy in lessons

1 short lesson on Reverse Proxy in 1 certification course.

Open the lessons