Quick Answer
Use a forward proxy when the requester needs an outbound route through another network. Use a reverse proxy when a service operator needs one public edge in front of one or more origins. Use an API gateway when that edge must govern APIs through authentication, quotas, routing, transformations, or analytics. Use an egress gateway when a platform team needs a controlled exit for workloads in a cluster, service mesh, or private network.
These components are complementary. A public API can receive requests through an API gateway, call internal services, and send approved outbound traffic through an egress gateway. A selected workload can then use an authenticated forward proxy for the external route. The egress gateway controls which workload may leave; the forward proxy supplies the route and exit presented to the destination.
Key Takeaways
- A forward proxy represents the requester. A reverse proxy represents the receiving service.
- An API gateway commonly acts as a specialized reverse proxy for an API surface.
- An egress gateway governs outbound traffic for a workload environment, not just one client.
- “Gateway” describes a role or boundary. It does not guarantee one protocol or feature set.
- A request can pass through all four components without any role being redundant.
- HTTPS visibility depends on TLS termination, tunneling, passthrough, or origination.
- DevOps teams should choose by represented side, control owner, traffic scope, and required outcome.
- Proxidize fits the forward-proxy role for approved public-web traffic needing residential or mobile exits.
Last updated: August 20, 2026.
Proxy and gateway labels become confusing when vendors use one product for several network roles. The direction of the arrow helps, but direction alone does not identify the right component.
The decisive questions are who the intermediary represents, who controls it, which traffic it governs, and what outcome it must produce. This guide applies those questions to common DevOps, Kubernetes, API, and public-web architectures.
For protocol-specific setup, use the complete Proxidize guides to forward proxies and reverse proxies. This article focuses on selection, overlap, and composition.
How Do Forward Proxies, Reverse Proxies, API Gateways, and Egress Gateways Compare?
Forward proxies represent requesters, reverse proxies represent services, API gateways govern APIs, and egress gateways govern workload exits.
That distinction is more reliable than sorting every component into “outbound” or “inbound.” Direction changes with the observer. A request leaving one service can be entering another, while one path can cross several administrative boundaries.
Published in June 2022, RFC 9110 defines a proxy as a message-forwarding agent selected by the client. It defines a gateway, also called a reverse proxy, as an intermediary that presents itself as an origin server. Modern API and cloud-native egress gateways build more specific operational roles on top of those foundations.
| Question | Forward proxy | Reverse proxy | API gateway | Egress gateway |
|---|---|---|---|---|
| Which side does it represent? | The requester or client | The receiving service or origin | The published API product | A cluster, mesh, namespace, or workload environment |
| Who normally controls it? | Client, application, data, or network team | Service, web, or infrastructure team | API platform or application team | Platform, network, or security team |
| Where does it sit? | Between a client and external destination | In front of one or more origins | At an API entry boundary | At a controlled exit from an environment |
| What is its primary job? | Route selected requests through another server and exit | Receive, route, and protect inbound service traffic | Publish and govern APIs | Centralize outbound route, policy, identity, and telemetry |
| What does the destination see? | The proxy's network address | Not applicable to the upstream client path | The gateway as the service endpoint | The gateway or downstream NAT/proxy address |
| Typical controls | Proxy authentication, routing, location, sessions, protocol | TLS termination, upstream routing, load balancing, caching | API authentication, keys, quotas, versions, transformations | Workload selection, destination policy, source IP, audit |
| Named examples | Proxidize, Squid, enterprise web proxies | NGINX, HAProxy, Envoy | Amazon API Gateway, Azure API Management, Apigee, Kong | Istio Egress Gateway, Cilium Egress Gateway |
| What does it not imply? | API governance or origin protection | API lifecycle management | Arbitrary internet exit diversity | Residential or mobile exit networks |
The shortest useful decision is:
- Choose a forward proxy to control how a client reaches an external destination.
- Choose a reverse proxy to control how clients reach services you operate.
- Choose an API gateway to expose those services as governed APIs.
- Choose an egress gateway to control which managed workloads can leave an environment.
These are roles, not mutually exclusive appliance categories. NGINX or Envoy can perform reverse-proxy work.
Envoy can also form part of an API gateway, service-mesh data plane, or egress gateway. The deployment and policy determine the role.
In short: A forward proxy is requester-side routing. A reverse proxy is service-side delivery. An API gateway is an API control plane on the request path. An egress gateway is a workload-environment exit. Start with the represented side and policy owner, then evaluate products.
Why Are Proxies and Gateways Easy to Confuse?
Proxies and gateways are easy to confuse because one product can perform several roles, while the role depends on placement and control.
“Proxy” can describe HTTP forwarding behavior, a SOCKS connection, a deployed service, or a commercial exit network. “Gateway” is broader. It often marks a managed boundary between systems, but the name does not reveal whether the implementation operates at the application, transport, or network layer.
The IETF terminology also differs from modern cloud product language. RFC 9110 treats “gateway” and “reverse proxy” as equivalent HTTP intermediary terms.
Cloud teams now use compounds such as API gateway, ingress gateway, egress gateway, NAT gateway, internet gateway, and secure web gateway. Those compounds are not interchangeable.
| Term type | What it tells you | Example | What it does not prove |
|---|---|---|---|
| Protocol role | How an intermediary participates in a request | HTTP forward proxy | Which team owns it |
| Architectural role | Which boundary the component governs | API gateway | Which software implements it |
| Product category | A packaged group of capabilities | Managed API gateway | That every feature is enabled |
| Deployment position | Where traffic crosses a boundary | Mesh egress gateway | That bypass is impossible |
| Network identity | Which address appears downstream | Static egress IP | That application policy exists |
Microsoft's API gateway pattern describes an API gateway as a reverse proxy and a centralized entry point. Istio's egress-gateway documentation describes a dedicated exit point for service-mesh traffic. Cilium's egress-gateway documentation describes policy-driven routing and source network address translation, or SNAT.
Those three gateways share a boundary idea, not one packet-processing model. The API gateway receives application requests for owned APIs.
Istio can use Envoy for service-aware outbound processing. Cilium can route selected packets through a node and apply a chosen source IP.
Product names add another layer of ambiguity. NGINX is widely used as a reverse proxy, but NGINX configuration can also perform load balancing, caching, and TLS termination.
Envoy can sit at an inbound edge, beside workloads, or at egress. A product name never replaces an architecture diagram.
In short: “Proxy” and “gateway” do not describe one fixed software category. Identify the request path, represented party, policy owner, and enabled capabilities. A familiar product can occupy several roles, while two products bearing “gateway” may operate at entirely different architectural layers.
What Is a Forward Proxy?
Forward proxies are client-side intermediaries that send selected outbound requests through another server before reaching a destination.
The client explicitly configures the proxy endpoint, follows an operating-system policy, or uses an application that knows how to reach it. The external destination receives the connection from the proxy's exit network instead of directly from the original client.
RFC 9110's definition centers on client selection. That detail matters.
A forward proxy is not defined merely by an arrow pointing outward; it is the intermediary acting on behalf of the requester. Intercepting enterprise proxies can make selection less visible to an application, but they still govern the requester side of the exchange.
Forward proxies can operate through several protocols:
| Mode | What the proxy does | Common use |
|---|---|---|
| HTTP proxying | Receives an HTTP request with a target URI and forwards it | Plain HTTP requests and HTTP-aware policy |
| HTTP CONNECT | Creates a tunnel, commonly for end-to-end HTTPS | HTTPS destinations through an HTTP proxy |
| HTTPS proxy connection | Encrypts the client-to-proxy leg before forwarding or tunneling | Protecting proxy credentials and metadata on that leg |
| SOCKS5 | Relays connections without requiring HTTP semantics | Applications needing broader TCP support and, where implemented, UDP |
A forward proxy can provide one stable corporate exit, or it can expose a pool of rotating exits. It can be self-hosted or managed.
It can use datacenter, ISP, residential, or mobile networks. “Forward proxy” describes its relationship to the client, not its IP type or business model.
Typical DevOps uses include:
- Giving a build or data workload a defined external route.
- Centralizing outbound web filtering for managed clients.
- Reaching public content from an approved country, city, ISP, or carrier context.
- Keeping a sticky external session when a workflow needs continuity.
- Separating public-web collection projects through different credentials or access points.
- Recording proxy-level connection, authentication, session, and transfer telemetry.
A forward proxy is not a firewall rule, an API-management platform, or permission to access a destination. It changes the route. The requester remains responsible for authorization, applicable laws, third-party terms, rate limits, and responsible collection practices.
The Proxidize forward-proxy guide covers HTTP, HTTPS, SOCKS5, CONNECT, cURL, Python, browser setup, and troubleshooting in greater depth.
| Choose a forward proxy when… | Choose another component when… |
|---|---|
| A client needs an authenticated outbound proxy endpoint | You need to receive traffic for an origin you operate |
| The destination should see a proxy exit network | You need API keys, quotas, versions, and developer-facing API policy |
| The application needs rotation or sticky sessions | You need cluster-wide egress enforcement |
| A public-web workflow needs a location or IP type | You need only subnet-level source address translation |
In short: A forward proxy represents the requester and supplies an alternate route to an external destination. Its protocol, IP type, rotation behavior, and authentication model are separate choices. Use it for client-side routing and exit requirements, not for inbound service delivery or cluster policy.
What Is a Reverse Proxy?
Reverse proxies are service-side intermediaries that receive client requests and forward them to one or more managed origin servers.
Clients normally call the service's public hostname. DNS and infrastructure place the reverse proxy on that path, so clients do not need a forward-proxy setting. The reverse proxy decides which origin should handle the request.
RFC 9110 calls this role a gateway or reverse proxy because it acts as an origin server for the client-facing connection. The actual origin can remain private. The NGINX reverse-proxy guide shows the common implementation: NGINX accepts a request, passes it to a configured upstream, receives the response, and returns that response to the client.
A reverse proxy can perform several edge functions:
| Function | What it provides | Is it automatic? |
|---|---|---|
| Upstream routing | Selects a service by host, path, header, or other rules | Core to the role |
| TLS termination | Presents the service certificate and decrypts requests | Common, but optional |
| Load balancing | Distributes traffic across healthy origins | Common, but requires configuration |
| Health checking | Avoids unavailable upstreams | Product and configuration dependent |
| Caching | Serves reusable responses without contacting the origin | Optional and workload dependent |
| Compression | Reduces response size at the edge | Optional |
| Web application firewall | Applies attack-detection rules | Separate feature or integration |
| Origin shielding | Keeps origin addresses and topology away from clients | Common architectural outcome |
Do not infer all of those features from “reverse proxy.” A minimal reverse proxy can simply forward requests. A CDN, ingress controller, edge load balancer, and API gateway may all perform reverse-proxy behavior while adding their own control planes.
Reverse proxies are appropriate when a team operates the receiving service. They can provide one public endpoint for many internal services, terminate certificates consistently, perform host or path routing, and support controlled deployments across backend pools.
They are not designed to give an outbound scraper a different residential or mobile identity. Placing NGINX in front of your own application does not change how that application calls an unrelated public site. That outbound path needs a forward proxy, egress gateway, NAT layer, or a combination based on the actual requirement.
In short: A reverse proxy represents services you operate. It receives ordinary client requests and routes them to managed origins. TLS termination, load balancing, caching, and WAF controls are common additions, but none turns it into an outbound proxy or a complete API-management system.
What Is an API Gateway?
API gateways expose and govern API traffic through routing, authentication, quotas, transformations, observability, and lifecycle controls.
An API gateway normally occupies the service side of a request. Clients call the gateway's API endpoint, and the gateway routes accepted requests to backend services, serverless functions, or other integrations. It therefore performs reverse-proxy behavior, but its operating model is API-specific.
The Amazon API Gateway Developer Guide describes a managed “front door” for REST, HTTP, and WebSocket APIs. Its documented responsibilities include traffic management, authorization, access control, monitoring, and API version management. Azure API Management similarly documents routing, keys, JWTs, client certificates, quotas, rate limits, transformations, caching, logs, metrics, and traces.
API gateway capability falls into two groups:
| Capability | Why API teams use it | Availability |
|---|---|---|
| Route matching | Maps a public API operation to a backend | Foundational |
| API authentication | Validates keys, JWTs, certificates, or external identity | Common |
| Authorization | Allows an identity to call a specific API or operation | Common |
| Quotas and rate limits | Applies consumer- or operation-level usage policy | Common |
| Request transformation | Rewrites headers, paths, payloads, or protocols | Product dependent |
| Version and stage management | Separates API releases and environments | Product dependent |
| Developer portal and subscriptions | Packages APIs for consumers | Product dependent |
| Response caching | Reduces repeated backend work | Product dependent |
| Analytics and monetization | Measures consumer or product usage | Product dependent |
The distinction is policy depth, not a universally different wire protocol. Both a reverse proxy and an API gateway can accept HTTPS and route by path. The API gateway becomes valuable when the API itself is a governed product with consumers, identities, plans, quotas, versions, schemas, or transformations.
An API gateway should not become a dumping ground for every application concern. Large business workflows, domain logic, and arbitrary data repair belong in services. Gateway policies should stay bounded, observable, testable, and portable enough for the team's operating model.
An API gateway also does not manage general workload egress. If an API backend calls a payment provider, model endpoint, webhook destination, or public website, that outbound call may need an egress gateway or forward proxy. The inbound API gateway has already completed its part of the path.
In short: An API gateway is usually a specialized reverse-proxy boundary for published APIs. Choose it when API consumers need authentication, authorization, quotas, versions, transformations, or analytics. Do not expect it to provide cluster-wide egress governance or managed residential and mobile exits.
What Is an Egress Gateway?
Egress gateways create a managed exit for selected workload traffic, centralizing routes, source identity, policy, and observation.
The controlled workload can be a pod, namespace, service mesh, subnet, or application group. Platform and security teams usually own the gateway. Workloads follow platform routes or policies instead of selecting an arbitrary external exit independently.
Unlike an HTTP forward proxy, “egress gateway” does not identify one application protocol. Implementations differ:
| Implementation | Selection and forwarding model | Typical outcome |
|---|---|---|
| Istio Egress Gateway | Service-mesh routing sends selected outbound traffic through dedicated Envoy gateway workloads | Central route rules, telemetry, TLS policy, and a dedicated exit point |
| Cilium Egress Gateway | Cilium policy selects workloads and destinations, routes packets through an egress node, and applies SNAT | Predictable source IP and network-layer policy |
| Cloud NAT or managed network egress | Private-subnet routes translate outbound source addresses | Internet reachability without unsolicited inbound connections |
| Secure outbound proxy tier | Workloads connect through an application-aware proxy | URL, protocol, identity, or content-aware controls where configured |
Istio also supports TLS origination at an egress gateway. An application can originate HTTP while the gateway creates TLS toward the external service.
The mesh can protect its internal hop separately. This differs from blindly passing an existing end-to-end TLS connection.
An egress gateway can help teams:
- Route approved destinations through a controlled set of nodes.
- Give external partners a predictable source IP to allowlist.
- Apply workload-aware destination policy.
- Collect outbound logs and metrics in one operational tier.
- Originate TLS or enforce transport policy where supported.
- Keep direct internet routes away from selected namespaces or workloads.
However, deployment does not equal enforcement. Istio explicitly warns that defining an egress gateway does not securely guarantee that all egress uses it.
A compromised workload that bypasses the sidecar can potentially bypass the gateway. Istio recommends combining mesh routing with external firewall, Kubernetes, or other network controls.
That limitation is central to DevOps design. A gateway becomes an enforcement point only when alternate paths are closed. The route, network policy, node firewall, cloud security controls, and DNS model must support the claimed boundary.
An egress gateway does not automatically supply thousands of public exit addresses, location targeting, mobile carrier identity, residential networks, or sticky proxy sessions. It may have one predictable source address. If selected workloads need a managed external proxy network, the egress layer can govern access to that forward proxy as a separate downstream component.
In short: An egress gateway is a platform-owned exit for managed workloads. Its implementation may be an application proxy, service-mesh gateway, or network routing and SNAT function. Enforce it by closing bypass paths, and add a forward proxy when the external route needs specialized exits.
Is an API Gateway the Same as a Reverse Proxy?
API gateways commonly act as reverse proxies, but add API-specific policy and lifecycle features that a basic reverse proxy may not provide.
Calling the two components identical hides a useful architecture decision. Calling them completely unrelated is also inaccurate. An API gateway usually receives requests on behalf of backend APIs, so it occupies the reverse-proxy side of the connection.
Microsoft's gateway pattern for microservices explicitly describes an API gateway as a reverse proxy. It also lists cross-cutting functions such as authentication, mutual TLS, rate limiting, logging, monitoring, caching, and web application firewall integration. AWS and Azure add API-oriented control planes around that request path.
| Capability | Basic reverse proxy | API gateway |
|---|---|---|
| Receive traffic for managed origins | Yes | Yes |
| Route by host or path | Common | Common |
| Terminate TLS | Common | Common |
| Balance backend traffic | Common | Built in, delegated, or integration dependent |
| Cache responses | Optional | Optional |
| Validate API keys or JWTs | Possible with modules or integrations | Common first-class policy |
| Apply consumer-specific quotas | Uncommon in a basic setup | Common |
| Transform API requests and responses | Possible, but configuration oriented | Common product capability |
| Manage stages or API versions | Not normally a core concept | Common |
| Publish developer documentation or plans | Not normally | Product dependent |
| Serve general websites and static content | Common | Usually not the primary purpose |
Consider three workloads:
- A marketing site needs TLS termination, compression, and three healthy web origins. A reverse proxy or edge load balancer is usually sufficient.
- A partner API needs OAuth validation, per-partner quotas, schema-aware transformations, and usage analytics. An API gateway is the better boundary.
- A platform has both needs. The API gateway can own consumer policy while a downstream reverse proxy or load balancer owns origin delivery.
The third pattern is valid only when responsibilities remain distinct. Two layers should not both retry every failure, rewrite the same headers, terminate the same identity without a trust contract, or apply conflicting route rules.
An API gateway does not always replace a load balancer. A managed gateway may distribute requests across integrations.
A dedicated load balancer may still be needed for transport protocols, private service discovery, health models, or large backend pools. Product documentation and the deployment target decide that question.
In short: An API gateway is usually a reverse proxy with API-product controls. Use a basic reverse proxy for service delivery and edge functions. Add or choose an API gateway when consumer identity, quotas, versions, transformations, subscriptions, or API analytics become first-class requirements.
Is an Egress Gateway the Same as a Forward Proxy?
Egress gateways and forward proxies both handle outbound traffic, but they differ in scope, ownership, enforcement, and exit identity.
A forward proxy is an endpoint or relay acting for a requester. An egress gateway is the controlled exit for an environment.
One application can explicitly select a forward proxy. A platform team can require hundreds of workloads to follow an egress route without giving each workload independent control over that route.
| Decision point | Forward proxy | Egress gateway |
|---|---|---|
| Represented entity | Client or requester | Workload environment |
| Typical owner | Application, data, endpoint, or network team | Platform, cloud, network, or security team |
| Selection | Client configuration, proxy policy, or interception | Mesh, routing, workload selector, or network policy |
| Common scope | Selected applications or requests | Pods, namespaces, clusters, or subnets |
| Interface | HTTP, HTTPS proxying, CONNECT, or SOCKS5 | Product-specific L7 proxying, L3/L4 routing, or SNAT |
| Authentication | Proxy credentials or approved source IP | Workload identity, service account, labels, namespace, or network source |
| Public source identity | Proxy exit address or pool | Gateway, egress node, or downstream NAT address |
| Location and session controls | Available from specialized providers | Not implied |
| Enforcement | Depends on client and surrounding network controls | Intended as platform policy, but bypass routes must be closed |
| Main goal | Route and external exit behavior | Central outbound governance |
The overlap becomes clear in a Kubernetes data-collection service. The platform team might allow only one namespace to reach a Proxidize endpoint through an Istio egress gateway. The workload then authenticates to Proxidize and requests a residential or mobile proxy route.
The two layers answer different questions:
- Egress gateway: Is this workload allowed to make this class of outbound connection?
- Forward proxy: Through which external proxy endpoint, IP type, location, and session should the request travel?
A Cilium egress policy that applies SNAT can give an external partner one stable corporate source IP. That may eliminate the need for a forward proxy when static allowlisting is the only goal. It does not provide a rotating residential pool or mobile carrier route.
Conversely, configuring a forward proxy in one process does not prove that every other process uses it. If a security requirement says all namespace egress must be controlled, platform-level routes and network policy remain necessary.
In short: A forward proxy solves client routing and external exit requirements. An egress gateway solves environment-wide outbound governance. Use either one when its scope is enough. Combine them when platform policy must control which workloads may use a specialized external proxy route.
Can All Four Components Appear in One Architecture?
All four components can coexist when inbound API control, origin delivery, platform egress policy, and external proxy routing are separate needs.
The following pattern is reasonable for a public data platform. The API gateway validates consumers.
A reverse proxy or internal load balancer distributes accepted work. An egress gateway controls which workloads can leave the cluster. A forward proxy routes approved public-web requests through the required external network.
The reverse-proxy tier is optional. Some API gateways already provide every required backend-routing function. Keeping a separate tier makes sense when it owns a distinct origin pool, private routing domain, protocol, or operational team.
One request can cross the architecture in seven steps:
- The API consumer sends HTTPS to the API gateway's public hostname.
- The API gateway validates the consumer and applies API policy.
- The gateway sends accepted work to a private reverse proxy or load balancer.
- The reverse proxy selects an application or worker service.
- The worker attempts an approved outbound public-web request.
- Platform policy routes that connection through the egress gateway and then the configured forward proxy.
- The public destination sees the selected proxy exit, not the original API consumer or cluster address.
Each hop has a separate identity:
| Boundary | Identity being evaluated | Example control |
|---|---|---|
| Consumer → API gateway | API consumer | OAuth token, JWT, client certificate, or API key policy |
| API gateway → origin tier | Gateway or service identity | Mutual TLS, private networking, or signed service credentials |
| Origin tier → worker | Internal workload | Service identity and authorization |
| Worker → egress gateway | Pod, namespace, service account, or source | Mesh policy or network policy |
| Worker/gateway → forward proxy | Proxy customer or access point | Username/password or approved public source IP |
| Forward proxy → destination | Public client represented by the exit | Destination's ordinary application authorization and policy |
Do not reuse one credential across those boundaries. An API token is not a proxy credential.
A workload identity is not destination authorization. RFC 9110's proxy-authentication model places Proxy-Authorization at the proxy hop, while an origin Authorization header belongs to the destination or an explicitly trusted API gateway.
This separation also improves incident response. A spike in denied egress identifies a workload-policy problem. An HTTP 407 identifies proxy authentication.
An API 401 or 403 points to consumer or destination authorization. A reverse-proxy 502 can point to an unavailable upstream. One generic “gateway error” alert would blur those causes.
In short: All four roles can appear on one request path because each can own a different architectural trust boundary. Keep their identities, policies, logs, retries, and owners separate. Remove a layer only when another component explicitly assumes its complete documented responsibility.
Which Component Should DevOps Teams Choose?
DevOps teams should choose by represented side, control owner, traffic scope, and required outcome rather than by product label.
The Four-Boundary Gateway Test turns a vague product comparison into four architecture questions:
| Boundary question | Forward-proxy answer | Reverse-proxy answer | API-gateway answer | Egress-gateway answer |
|---|---|---|---|---|
| 1. Who is represented? | The requester | The receiving service | The API product | The workload environment |
| 2. Who owns control? | Client, application, data, or endpoint team | Service or infrastructure team | API platform or product team | Platform, network, or security team |
| 3. Which traffic is in scope? | Selected client requests | Inbound requests for owned origins | Requests to a published API surface | Outbound traffic from selected workloads |
| 4. What outcome is required? | Alternate route and exit identity | Origin delivery and protection | API governance | Enforceable egress policy and observation |
The test synthesizes the client and service roles in RFC 9110, the API controls in the Amazon API Gateway documentation, and the environment boundary in Istio's egress model.
Apply the test in order:
- Name the represented party. Do not start with a vendor or Kubernetes object.
- Name the policy owner. A developer preference and a security mandate need different control planes.
- Draw the exact traffic scope. Include protocols, namespaces, destinations, and bypass paths.
- Write the required outcome as a test. “Partner sees source IP X” is better than “add egress.”
- Select the smallest role that passes the test. Combine roles only for independent requirements.
The resulting decision tree is short:
Real systems often produce two “yes” answers. The table below shows common combinations:
| Requirement | Primary component | Possible companion |
|---|---|---|
| Terminate TLS and balance a web application | Reverse proxy | CDN or WAF |
| Publish a partner API with JWT validation and quotas | API gateway | Reverse proxy or private load balancer |
| Give a Kubernetes namespace one approved external route | Egress gateway | NAT or firewall controls |
| Let a CI job use an authenticated outbound HTTP proxy | Forward proxy | CI secret manager |
| Let an external partner allowlist one workload source IP | Egress gateway or NAT | Network policy |
| Collect public prices from several countries | Managed residential forward proxy | Egress gateway for workload governance |
| Validate a mobile search or ad experience in a target market | Managed mobile forward proxy | Egress gateway for workload governance |
| Prevent arbitrary pod access to the internet | Egress controls plus network policy | DNS and firewall policy |
| Protect origins while enforcing API-consumer quotas | API gateway plus reverse-proxy behavior | Dedicated reverse proxy if origin operations differ |
| Call one ordinary third-party API from a trusted service | Direct HTTPS may be enough | Egress gateway if policy requires it |
For the CI/CD scenario, How Do You Secure Proxy Credentials in CI/CD Pipelines? covers secret storage, runner trust, authentication choices, log redaction, testing, and rotation.
The last row matters. Not every external call requires a proxy.
Adding a gateway introduces latency, cost, failure modes, certificate handling, logs, upgrades, and on-call ownership. “No intermediary” is a valid result when direct HTTPS satisfies routing, identity, audit, and policy requirements.
Product selection comes after role selection:
- A managed forward-proxy network reduces the work of sourcing exits, operating proxy servers, and managing rotation infrastructure.
- A self-hosted reverse proxy offers configuration control but needs patching, scaling, certificate, and availability work.
- A managed API gateway reduces control-plane operations but can add platform limits, pricing dimensions, and vendor-specific policies.
- A mesh or networking egress gateway integrates with workload identity but requires careful enforcement, capacity, and failure-domain design.
In short: Choose the architectural role before the product. Identify who is represented, who owns policy, which traffic is covered, and what measurable outcome is required. A direct connection may be sufficient; two gateways are justified only when they govern different boundaries.
What Can Each Proxy or Gateway See in HTTPS Traffic?
Each proxy or gateway sees connection metadata, but content visibility depends on TLS termination, tunneling, passthrough, or origination.
“Uses HTTPS” is not enough information. Teams must draw every TLS session independently. One request path can contain separate client-to-gateway, gateway-to-service, workload-to-proxy, and proxy-to-destination TLS connections.
Four processing modes explain most designs:
| TLS mode | What happens | Typical component | Content visibility at that component |
|---|---|---|---|
| Termination | The component presents a certificate and decrypts the request | Reverse proxy or API gateway | Request and response content is visible |
| Tunneling | The component relays bytes after creating a tunnel | HTTP forward proxy using CONNECT | End-to-end TLS content is normally opaque |
| Passthrough | The component routes an existing TLS stream without terminating it | Reverse or egress gateway | Metadata is visible; application content remains opaque |
| Origination | The component creates TLS for the next hop | Egress gateway or reverse proxy | It sees content received before establishing downstream TLS |
RFC 9110 defines CONNECT as a request to establish a tunnel to a target host and port. After a successful response, the intermediary restricts itself to blind forwarding.
The proxy can still observe connection metadata and the CONNECT target. It does not normally read the encrypted HTTP exchange inside the tunnel.
A TLS-inspecting corporate forward proxy is different. It terminates the client's TLS connection and creates another TLS connection to the destination.
Managed clients must trust its certificate authority. The proxy can then inspect content, so the organization needs explicit governance, privacy controls, key protection, and exclusions for sensitive traffic.
Reverse proxies and API gateways frequently terminate TLS because they must route, authenticate, transform, or inspect HTTP requests. They should normally use another protected connection to the origin when traffic crosses an untrusted network or the internal security model requires encryption.
Egress behavior is implementation specific. Istio can pass TLS through, originate TLS, or apply policies based on available metadata.
A Cilium SNAT path can change the source address without decrypting application traffic. The word “egress” does not answer the visibility question.
An HTTPS destination also does not automatically protect the client-to-forward-proxy leg. If a client connects to a proxy over unencrypted HTTP and sends proxy credentials before creating a CONNECT tunnel, those credentials are not protected by the later destination TLS session. Use the endpoint scheme and transport documented by the provider, and protect credentials on the path to the proxy.
| Component | Usually sees | Sees HTTP content when… |
|---|---|---|
| Forward proxy | Client address, proxy identity, destination, timing, byte counts | Traffic is plaintext or the proxy terminates TLS |
| Reverse proxy | Client/gateway metadata and requested service | It terminates client TLS or receives plaintext |
| API gateway | Consumer identity, API route, status, latency | It terminates TLS, as most API policy requires |
| Egress gateway | Workload/source identity, destination, timing, bytes | It terminates, originates, or receives plaintext traffic |
Never log more merely because a component can see more. Redact credentials, authorization headers, cookies, sensitive query values, and regulated payloads. Visibility is a capability and a liability.
In short: Map TLS per hop. Forward proxies often tunnel HTTPS, while reverse proxies and API gateways often terminate it. Egress gateways vary by implementation. Metadata remains visible even when payloads are encrypted, and TLS inspection requires an explicit security and privacy decision.
How Do Authentication and Policy Differ Across the Four Components?
Authentication and policy differ by boundary: proxy access, service access, API consumer access, and workload egress are separate decisions.
RFC 9110 assigns proxy authentication its own HTTP semantics. A forward proxy can return 407 Proxy Authentication Required with Proxy-Authenticate; the client can answer with Proxy-Authorization. Origin or API authentication normally uses Authorization and can produce 401 Unauthorized or 403 Forbidden, depending on the failure.
| Boundary | Identity or attribute | Common proof | Typical policy owner |
|---|---|---|---|
| Client → forward proxy | Proxy customer, project, or approved source | Username/password, token-like credential, or source-IP allowlist | Proxy or application owner |
| Client → reverse proxy | User, client, device, or source network | Session, bearer token, client certificate, signed request, or edge policy | Service/security owner |
| Consumer → API gateway | API consumer, application, tenant, or subscription | OAuth token, JWT, API key, mTLS certificate, or external authorizer | API platform/product owner |
| Workload → egress gateway | Pod, service account, namespace, node, or source | Mesh identity, label selector, network identity, route, or source address | Platform/network owner |
| Gateway/proxy → destination | Calling service or end user | Destination-specific credential | Application owner |
An API key may identify a calling application and select a quota, but it is not always sufficient user authentication. High-risk APIs often combine application identity with OAuth, signed tokens, mTLS, or another stronger control.
Keep each credential in its intended scope:
- A proxy credential should be consumed by the proxy. Do not send it to the public destination.
- A destination API token should travel through an approved proxy path without being logged or repurposed as proxy authentication.
- An API gateway should pass, exchange, or remove consumer credentials according to an explicit backend trust contract.
- An egress policy should evaluate workload identity independently of any credential inside the application request.
- A source-IP allowlist should not be treated as user identity when many workloads share the same NAT or gateway address.
Policy precedence also needs a written model. A platform team can allow a namespace to reach the proxy endpoint while the proxy denies invalid credentials.
The proxy can accept the connection while the destination rejects its API token. Those results are not contradictory; they come from separate authorization decisions.
A practical policy record names five items:
- The identity being evaluated.
- The resource or destination being protected.
- The evidence used to establish identity.
- The component making the decision.
- The log and owner used when the decision fails.
That record turns vague “gateway auth” tickets into a debuggable chain.
In short: Proxy authentication, API authentication, service authentication, and workload identity protect different resources and boundaries. Keep credentials and headers scoped to their intended hop. Diagnose 407, 401, 403, route denial, and destination rejection as distinct policy decisions with distinct operational owners.
How Do the Four Components Affect Reliability and Observability?
The four components create separate failure domains and telemetry, so teams must assign timeouts, retries, health checks, and owners per layer.
Every intermediary can improve reliability by centralizing controls. Every intermediary can also fail, saturate, misroute, reject, or hide the original cause. High availability requires more than running two replicas; downstream routes, state, certificates, DNS, capacity, and failure behavior must also be redundant.
| Component | Useful signals | Common failure symptoms | First operational question |
|---|---|---|---|
| Forward proxy | Authentication success, connection time, tunnel errors, exit address, session behavior, transferred bytes | 407, connection refusal, tunnel failure, unexpected exit, destination timeout | Can the client authenticate and reach a neutral HTTPS endpoint? |
| Reverse proxy | Request rate, upstream latency, active connections, healthy origins, TLS errors, 4xx and 5xx | 502, 503, 504, certificate error, route miss | Is the edge healthy, and is at least one origin reachable? |
| API gateway | Consumer, route, authorization result, quota, integration latency, transformation error | 401, 403, 404, 429, integration 5xx | Did API policy reject the request before backend invocation? |
| Egress gateway | Workload identity, destination, allow or deny, gateway node, SNAT address, bytes, TLS state | Policy denial, no route, DNS failure, handshake failure, bypass | Did platform policy select this workload and destination? |
Status codes are clues, not universal diagnoses. A reverse proxy can pass through an origin's 401. An API gateway can map backend errors.
A forward proxy can return a gateway-style 502 when its downstream connection fails. Logs must say which component produced the response.
Use one end-to-end correlation value where policy permits, but keep native connection identifiers too. HTTP request IDs cannot always cross a blind CONNECT tunnel or a network-only SNAT path. A useful trace therefore combines:
- Application request or job ID.
- API gateway request and consumer ID.
- Reverse-proxy upstream and connection ID.
- Workload, namespace, and egress-flow identity.
- Forward-proxy access point or session identifier.
- Destination hostname, status, and timing.
Do not place credentials, tokens, cookies, or full sensitive URLs inside those labels.
Timeouts need a total budget. If a caller allows 30 seconds, four intermediaries cannot each wait 30 seconds and then retry.
Set shorter connection and upstream budgets inside the caller's deadline. Record where the deadline expired.
Retries need one clear owner. Nested retries can multiply load: three application attempts, three gateway attempts, and three proxy attempts can create up to 27 downstream attempts.
Retry only operations that are safe to repeat. Use bounded attempts, backoff, jitter, and explicit handling for rate limits.
A layer-by-layer diagnostic sequence avoids guessing:
- Resolve the intended hostname from the workload.
- Confirm the local route or proxy configuration.
- Confirm egress policy selected the workload and destination.
- Test proxy reachability and authentication with a neutral endpoint.
- Verify each TLS handshake and certificate name.
- Test destination authentication and application response.
- Confirm the observed public exit only when that identity is a requirement.
Microsoft's Gateway Offloading pattern explains why shared edge functions can be moved out of services. The same design still requires capacity planning and clear failure ownership at the gateway tier.
In short: Each intermediary needs its own explicit availability target, capacity model, timeout, telemetry, and owner. Correlate the layers carefully without logging secrets. Prevent retry multiplication, diagnose from the nearest boundary outward, and test the public exit separately from final destination behavior.
When Should DevOps Teams Combine Multiple Gateways?
DevOps teams should combine gateways only when each layer owns a distinct trust boundary, policy decision, or network responsibility.
Composition is useful when one component cannot express the required identity or scope. It becomes harmful when teams stack products to solve the same problem twice.
| Combination | Clear division of responsibility | Example |
|---|---|---|
| API gateway + reverse proxy | Consumer/API policy + origin pool delivery | Partner API routed to several private services |
| API gateway + egress gateway | Inbound API policy + backend outbound policy | Public API calling approved payment or model endpoints |
| Reverse proxy + egress gateway | Inbound web delivery + service outbound governance | Web application with controlled webhook traffic |
| Egress gateway + forward proxy | Workload authorization + specialized external route | Approved scraper using residential or mobile exits |
| Reverse proxy + forward proxy | Owned-service edge + client-side route | Internal application consuming an unrelated public service |
| All four | API policy + origin delivery + platform egress + external proxy route | Governed public-web data platform |
Before adding a layer, complete this responsibility record:
| Field | Required answer |
|---|---|
| Boundary | The exact two trust zones separated by the component |
| Policy | The unique allow, deny, route, transform, or identity decision it owns |
| Bypass | The alternate path and the control that closes or accepts it |
| Failure | Expected caller behavior when the component is unavailable |
| Telemetry | Logs, metrics, traces, retention, and redaction |
| Owner | Team responsible for configuration, on-call response, and upgrades |
| Removal test | The requirement that would fail if this layer disappeared |
If the removal test has no answer, the layer may be redundant.
Watch for six common anti-patterns:
- Duplicate authentication: Two gateways validate the same token differently.
- Retry amplification: Applications and every gateway retry the same failed call.
- Header ambiguity: Several layers overwrite Forwarded, X-Forwarded-For, host, or authorization data.
- False enforcement: Dashboards show an egress gateway, but direct routes remain open.
- Credential crossover: Proxy credentials reach origins, or API tokens enter proxy logs.
- Circular routing: Environment variables or default routes send a gateway back through itself.
Trusted proxy configuration is especially important on inbound paths. A reverse proxy should accept client-address headers only from known upstreams.
Otherwise, a caller can forge an address that downstream logs or policy treats as authoritative. RFC 7239, published in June 2014, standardizes the Forwarded HTTP header but does not make untrusted values truthful.
On outbound paths, define exemptions carefully. Gateways often need direct access to DNS, identity, telemetry, certificate, or control-plane services. A broad “internal traffic” exception can become an unintended egress bypass.
In short: Combine components when they separate real trust zones and make different decisions. Document the boundary, bypass controls, failure behavior, telemetry, and owner for each layer. Remove duplicate policy, nested retries, ambiguous headers, and any gateway whose unique responsibility cannot be stated.
Where Do Kubernetes Ingress, kube-proxy, NAT Gateways, and Secure Web Gateways Fit?
Kubernetes Ingress handles routes, kube-proxy forwards Services, NAT changes addresses, and secure web gateways inspect user traffic.
These adjacent terms often appear in the same architecture diagram. None is a universal synonym for the four primary roles.
| Component | Main boundary | Primary function | Closest role in this article | Critical distinction |
|---|---|---|---|---|
| Kubernetes Ingress | External client → cluster Service | Exposes HTTP and HTTPS routes | Reverse proxy or API gateway | The Ingress object needs an implementation and does not imply API management |
| Kubernetes Gateway API | Network traffic → cluster services | Defines role-oriented routing resources | Ingress, service, or mesh gateway | An API name does not by itself provide a managed API product |
| kube-proxy | Service virtual IP → pod endpoint | Programs node forwarding for Kubernetes Services | None directly | It is not a configurable public-web forward proxy |
| NAT gateway | Private network → public network | Translates source addresses for outbound connections | Network egress component | It normally lacks HTTP proxy auth, API policy, and session targeting |
| Internet gateway | Virtual network ↔ internet | Provides network connectivity | None directly | Connectivity is not application proxying |
| Secure web gateway | Managed user/device → web | Filters and inspects outbound web use | Specialized forward-proxy or security service | Its priority is enterprise web security, not rotating public exits |
| Web application firewall | Client → protected application | Detects and filters application attacks | Reverse-proxy companion | It protects inbound applications, not general workload egress |
| Load balancer | Client or gateway → backend pool | Distributes connections or requests | Often paired with reverse proxy or API gateway | It may operate without API lifecycle or content-aware policy |
The Kubernetes Ingress documentation defines Ingress as HTTP and HTTPS routes from outside a cluster to Services. An ingress controller commonly performs reverse-proxy behavior. Some products add API-gateway features, but the Ingress resource alone does not create keys, quotas, subscriptions, or an API lifecycle.
The Kubernetes Service documentation describes kube-proxy as the node component that implements Service virtual IP behavior and forwards traffic to endpoints. Despite its name, kube-proxy is not the forward proxy described by RFC 9110 or configured through an HTTP proxy URL.
An AWS NAT gateway lets instances in a private subnet connect outside the VPC while preventing external systems from initiating connections through that NAT gateway. It can provide outbound connectivity and source translation. It does not understand proxy usernames, HTTP CONNECT sessions, API consumers, or residential location targeting.
Architecture language should therefore be precise. “We need one egress IP” may call for NAT or Cilium egress SNAT.
“We need to allow only selected domains” may require an L7 egress proxy plus network enforcement. “We need a residential exit in Paris” calls for a suitable forward-proxy network, not an ordinary cloud NAT.
In short: Ingress, kube-proxy, NAT, secure web gateways, WAFs, and load balancers overlap with parts of the request path. Classify each by its actual layer and policy. Do not infer HTTP proxying, API management, or specialized exit networks from a nearby name.
Where Does Proxidize Fit in This Architecture?
Proxidize is a managed forward-proxy layer for approved public-web traffic that needs residential or mobile exit networks.
The application connects to a Proxidize proxy endpoint using standard proxy configuration. Proxidize routes the request through the selected proxy network and presents that exit to the public destination. Dashboard and API controls support operational management without requiring teams to build and maintain the underlying managed proxy infrastructure.
Residential access supports country, city, and ISP targeting. Mobile access supports country, city, and ASN/ISP targeting. Both offer rotating and sticky session options, with per-GB access available.
Proxidize does not replace the other three roles:
| Requirement | Is Proxidize the primary component? | Appropriate component |
|---|---|---|
| Give an outbound workload a residential or mobile route | Yes | Proxidize forward proxy |
| Select rotating or sticky behavior for public-web requests | Yes | Proxidize forward proxy |
| Target an available country, city, ISP, or mobile carrier | Yes, according to product support | Proxidize proxy controls |
| Receive traffic for your website or origin | No | Reverse proxy, load balancer, or CDN |
| Validate API consumers and enforce quotas | No | API gateway |
| Enforce all namespace or cluster egress | No | Egress gateway plus network controls |
| Give a private subnet ordinary internet access | No | NAT or cloud networking |
| Inspect employee browsing for enterprise security | No | Secure web gateway |
Choose the product by the external network the workflow needs:
| Workload | Proxidize product fit | Why |
|---|---|---|
| Global web scraping and crawling | Residential Proxies | Real residential IPs with country, city, and ISP targeting |
| Regional SEO and SERP monitoring | Residential Proxies | Broad geographic coverage with rotating or sticky sessions |
| Price, availability, and marketplace monitoring | Residential Proxies | Geographic diversity for localized public results |
| AI and RAG public-web data collection | Residential Proxies | Global reach and managed pay-per-traffic infrastructure |
| Mobile SERP or ad verification | Mobile Proxies | Real 4G/5G mobile IPs with country, city, and ASN/ISP targeting |
| Long-lived mobile identity | Mobile - Per Proxy | Individually assigned mobile proxies with direct rotation control |
| Variable mobile collection workload | Mobile - PerGB | Shared mobile pool with usage-based access |
Check the product pages for current availability and targeting. IP supply and location availability can change.
There are two common deployment patterns:
The governed path requires compatible routing. A service-mesh gateway can route approved HTTP traffic to an upstream proxy when its configuration supports that pattern.
A workload can also use explicit proxy settings while network policy limits its possible destinations to the proxy endpoint. A raw SNAT gateway does not automatically speak HTTP proxy authentication or create a CONNECT tunnel.
Use separate proxy credentials or access points for projects and environments where the current product supports that separation. Keep credentials in a secret manager. Never place them in images, repositories, logs, screenshots, or client-side code.
Proxies are one part of reliable public-web operations. Respectful rate limits, retries, session handling, browser behavior, parsing, data quality, and compliance still matter.
Customers remain responsible for ensuring that collection and automation comply with applicable laws and third-party terms. Proxidize's Trust Center provides current security and compliance documentation.
In short: Proxidize supplies the managed forward-proxy and external-exit layer. Use Residential Proxies for residential-ISP coverage at scale and Mobile Proxies when a workflow needs mobile-carrier exits. Keep API, origin, cluster-egress, NAT, and security controls in their proper architectural layers and products.
What Should You Remember About Proxies and Gateways?
Proxies and gateways are easiest to choose when represented side, control owner, traffic scope, and required outcome are explicit.
- Forward proxy: Represents a requester and changes how selected outbound requests reach external destinations.
- Reverse proxy: Represents an operated service and controls how clients reach one or more origins.
- API gateway: Governs a published API through consumer-aware routing, authentication, quotas, versions, and related policy.
- Egress gateway: Governs how selected workloads leave a cluster, mesh, subnet, or other managed environment.
- Overlap: API gateways often perform reverse-proxy work, while egress gateways can contain proxy technology.
- Composition: Multiple components are justified when they own different trust boundaries, identities, or policies.
- Selection: Use the Four-Boundary Gateway Test before comparing vendors or writing configuration.
For a public-web workload, decide whether the requirement is environment governance, external proxy routing, or both. An egress gateway can authorize the workload.
Proxidize can provide the residential or mobile proxy route. Neither layer should silently assume the other's security responsibility.
In short: Represented side fundamentally separates forward from reverse. API policy separates an API gateway from a basic reverse proxy. Environment-wide outbound governance separates an egress gateway from a client-selected proxy. Proxidize belongs clearly on the managed forward-proxy side of that model.