Networking, Proxies & Service Mesh
The layer traffic crosses before it reaches your application: web servers, reverse proxies, load balancers, service meshes and service registries. Interviewers ask because most production problems — TLS, timeouts, routing, retries — are decided here rather than in application code.
on this pageshowhide
explore
- Nginx33 questions
- Config Model and Contexts5 questions
- Server and Location Blocks5 questions
- Reverse Proxy and Upstream6 questions
- TLS Termination6 questions
- Caching5 questions
- Rate Limiting and Security6 questions
- Apache18 questions
- Virtual Hosts, Modules & mod_proxy6 questions
- MPMs & Performance vs Nginx6 questions
- .htaccess & mod_rewrite6 questions
- Caddy5 questions
- HAProxy17 questions
- Frontend/Backend Model & ACL Routing5 questions
- Health Checks, Stats & Runtime Control6 questions
- Stick Tables, Persistence & Rate Limiting6 questions
- Tomcat18 questions
- Connectors & Thread Pools6 questions
- Web Apps, Contexts & Classloading6 questions
- Embedded Tomcat in Spring Boot6 questions
- IIS5 questions
- Istio18 questions
- Sidecar & Ambient Data Plane6 questions
- Traffic Management CRDs6 questions
- mTLS & Authorization Policy6 questions
- Linkerd5 questions
- Consul18 questions
- Consul Service Discovery & Health6 questions
- Consul KV, Watches & Templated Config6 questions
- Consul Connect Service Mesh6 questions
- Envoy18 questions
- Listeners, Filters & Clusters6 questions
- xDS Dynamic Configuration6 questions
- Envoy Observability & Resilience6 questions
- Eureka5 questions
- Networking & Proxy Concepts38 questions
- L4 vs L7 Routing5 questions
- TLS Termination, Passthrough & mTLS5 questions
- Health Checking & Outlier Ejection5 questions
- Load Balancing Algorithms & Session Affinity5 questions
- Connection Lifecycle & Timeout Budgets5 questions
- Service Discovery Models4 questions
- Service Mesh Model & Trade-offs5 questions
questions
198 · 12 sectionsYou want nginx to cache the responses it gets from an upstream it proxies to. Which two nginx directives are the minimum to turn caching on, which context does each belong in, and how do you confirm a response was actually served from the cache?
basics
~20 sDeclare the store once with proxy_cache_path in the http context, then switch it on with proxy_cache <zone> in the proxying server or location. Confirm hits by logging $upstream_cache_status, which reports HIT, MISS, BYPASS, EXPIRED, STALE, UPDATING or REVALIDATED.
In an nginx configuration file, what are the main, events, http, server and location contexts, and what happens to a directive set in an outer context when an inner context does not repeat it?
basics
~20 sAn nginx configuration is a tree of nested contexts — main, events, http, server, location — and each nested level inherits the directives of the level above it unless that level sets its own value for the same directive.
An app sitting behind nginx `proxy_pass` logs every client IP as the proxy's address, sees an upstream group name in its Host header, and builds http:// links although users arrive over HTTPS. Which `proxy_set_header` directives fix this, and what is nginx doing by default?
basics
~10 sSet Host, X-Forwarded-For and X-Forwarded-Proto with proxy_set_header. Nginx defaults Host to $proxy_host, the proxied server's name, and sends no forwarded headers at all, so the app sees the proxy's IP and assumes plain HTTP.
You added `proxy_cache` to an nginx location, but $upstream_cache_status logs MISS on every single request for the same URL and the upstream still sees full load. What would you check, in order, in nginx's own rules and in the upstream's response headers?
basics
~20 sA permanent MISS means nginx is looking but never storing. Check the request method (GET and HEAD only by default), then the upstream headers — Set-Cookie, Cache-Control no-store/no-cache/private/max-age=0, or a past Expires all block storage — then whether proxy_cache_valid covers that status code.
A handful of clients are exhausting an nginx server by holding many simultaneous slow downloads open. Why does `limit_conn` help here where `limit_req` does not?
basics
~20 slimit_req meters request arrival rate, so a client that opens one request and keeps it open forever never trips it. limit_conn caps concurrent in-flight connections per key, which is the resource slow downloads and slowloris-style clients actually consume.
In Apache mod_rewrite, what is the difference between `RewriteRule ^old/(.*)$ /new/$1 [L]` and the same rule written `[R=301,L]`?
basics
~20 sWith [L] alone the rewrite is internal: Apache serves the new path itself and the client never learns anything changed. With [R=301,L] Apache sends a redirect response carrying a Location header, so the browser issues a second request and its address bar updates.
In Apache httpd, what work does the server do on every single request when .htaccess files are enabled, and how does the AllowOverride directive change it?
basics
~20 sApache httpd looks for an .htaccess file in every directory along the path to the requested file, on every request, and re-parses each one it finds. AllowOverride None removes that lookup entirely; any other value enables it.
Apache httpd ships three main multi-processing modules — mpm_prefork, mpm_worker and mpm_event. How does each one map connections to processes and threads, and what specifically does mpm_event change?
basics
~20 smpm_prefork dedicates one single-threaded process per connection; mpm_worker runs many threads inside a few processes; mpm_event is worker plus a listener thread that holds idle keep-alive connections so no worker thread is parked on them.
In Apache httpd running mpm_event, how do MaxRequestWorkers, ServerLimit and ThreadsPerChild relate, and what happens if you set MaxRequestWorkers higher than ServerLimit multiplied by ThreadsPerChild?
basics
~20 sMaxRequestWorkers is the total worker threads across all children, and it cannot exceed ServerLimit times ThreadsPerChild. Set it higher and httpd logs a startup warning and silently lowers it to that product, so your intended concurrency never takes effect.
In Apache httpd with mod_proxy, what does ProxyPassReverse do that ProxyPass does not, and what breaks in production if you configure ProxyPass alone?
basics
~20 sProxyPass maps an inbound URL path to a backend and forwards requests. ProxyPassReverse works on the way back, rewriting Location, Content-Location and URI response headers so a backend redirect pointing at the internal address is translated into the public URL.
A Caddyfile contains only the site block `example.com { reverse_proxy localhost:8080 }`. Describe what Caddy does about HTTPS when it loads that config, and what has to be true of the host for it to work.
basics
~20 sCaddy reads the site address as a public domain, so it obtains a certificate for example.com from a public ACME certificate authority, serves the site over HTTPS, redirects plain HTTP to HTTPS, and renews the certificate on its own. No TLS configuration is written anywhere.
The Caddyfile is not Caddy's native configuration format. What is, how does the Caddyfile relate to it, and how does a running Caddy instance receive a new configuration?
basics
~20 sCaddy's native config is JSON. The Caddyfile is human-friendly input that a config adapter converts to that JSON before loading. A running instance takes new config through its admin API, which listens on localhost:2019 and applies changes gracefully without restarting.
You run Caddy with automatic HTTPS in containers and scale it from one instance to six behind a network load balancer. Certificate issuance starts failing against the certificate authority's rate limits. What is going wrong and how do you fix it?
basics
~20 sEach Caddy instance has its own private storage, so all six independently order certificates for the same names — and container restarts lose that storage and re-order again. The fix is one shared, persistent storage backend that every instance reads and writes.
For a new internet-facing edge tier, when would you choose Caddy over a more established proxy such as nginx or HAProxy, and what are you giving up by doing so?
basics
~20 sChoose Caddy when certificate operations dominate the work — many or customer-supplied hostnames, small teams, no PKI runbook — and when a short config is worth more than fine-grained tuning. You give up tuning surface, operational precedent, and dynamic plugins, since third-party modules must be compiled in.
Caddy's on-demand TLS obtains a certificate during the TLS handshake for a hostname it has never been configured with. What does that make possible, what is the abuse risk, and what control contains it?
basics
~20 sOn-demand TLS lets customers point their own domains at your service with no config change, because Caddy issues per hostname at handshake time. Unrestricted, anyone aiming DNS at you triggers issuance attempts, so it must be gated by an ask endpoint that approves each name.
Walk through the shape of an HAProxy configuration file: what do the global, defaults, frontend and backend sections each configure, and what does a listen section do instead?
basics
~20 sHAProxy config is split into global (process-wide settings), defaults (a template inherited by every proxy declared after it), frontend (a bind address that classifies incoming traffic), and backend (the server pool). A listen section fuses a frontend and backend into one block.
In HAProxy, a backend contains the line `server app1 10.0.0.1:8080 check`. What does the `check` keyword probe on its own, and how do `option httpchk` and `http-check expect` change what HAProxy accepts as a healthy server?
basics
~20 sHAProxy's bare check keyword only opens a TCP connection to the server port. option httpchk makes the probe send an HTTP request instead, and http-check expect narrows success from any 2xx or 3xx reply to a specific status, regex or body string.
In an HAProxy frontend with several `use_backend` rules and a `default_backend`, how does HAProxy decide which backend a request goes to, and how do multiple ACLs in one condition combine?
basics
~20 sHAProxy evaluates use_backend rules top to bottom and the first one whose condition is true wins; if none match it uses default_backend. Space-separated ACL names in a condition are AND-ed, || is OR, and ! negates.
An HAProxy backend has `cookie SRVID insert indirect nocache` plus `server s1 10.0.0.11:8080 check cookie s1`. What does HAProxy add to the traffic, and what do the `indirect` and `nocache` keywords each change?
basics
~20 sHAProxy adds Set-Cookie: SRVID=s1 to the first response so later requests carrying that cookie go back to s1. indirect strips the cookie before forwarding to the server and skips insertion when the client already sent a valid one; nocache marks the response private so shared caches cannot store it.
You need an HAProxy frontend to answer 429 to any client IP that exceeds 100 requests in 10 seconds. Walk through the `stick-table`, `http-request track-sc0` and `http-request deny` lines required, and explain what order they must appear in and why.
basics
~20 sDeclare a table storing http_req_rate(10s), track each request against it with http-request track-sc0 src, then deny with http-request deny deny_status 429 if { sc_http_req_rate(0) gt 100 }. The track rule must come first, because the deny rule reads the counter that tracking populates.
A Spring Boot application built with spring-boot-starter-web starts with `java -jar app.jar` on a host where no Tomcat is installed, and logs "Tomcat started on port 8080". What is actually serving HTTP, and what does setting `server.port=0` do?
basics
~20 sspring-boot-starter-web pulls Tomcat in as an ordinary library, so the application starts a real Tomcat inside its own JVM process on port 8080. Setting server.port=0 makes it bind a random free port chosen by the operating system.
You copy analytics.war into a standalone Tomcat's webapps/ directory. What context path does the application end up on, how would you instead serve it at the root path, and what does the Host attribute autoDeploy do while Tomcat is running?
basics
~20 sTomcat derives the context path from the WAR's file name, so analytics.war deploys at /analytics. Name the file ROOT.war to serve it at the root path. With autoDeploy enabled, Tomcat scans webapps/ while running and deploys or redeploys changed files.
In a Tomcat server.xml <Connector>, what do maxThreads, maxConnections and acceptCount each limit, and what happens to an incoming connection as each of those limits is reached in turn?
basics
~20 smaxThreads caps how many requests Tomcat processes at once, maxConnections caps how many sockets it holds open, and acceptCount is the OS accept-queue length used once maxConnections is full. Past all three, new connections are refused.
A Spring Boot service on embedded Tomcat stops answering new requests under load while its CPU stays near idle. Which `server.tomcat.*` properties bound how many requests it can handle at once, and what happens to a request that arrives past each bound?
basics
~20 sThree properties bound it: server.tomcat.max-connections (default 8192) caps accepted connections, server.tomcat.threads.max (default 200) caps requests processed at once, and server.tomcat.accept-count (default 100) sizes the OS backlog beyond that. Idle CPU means the 200 threads are blocked, not busy.
In a standalone Tomcat, the same library jar sits both in $CATALINA_BASE/lib and in a web application's WEB-INF/lib. Which copy does the application's code load, and what goes wrong when instances of that library's classes have to pass between Tomcat's own code and the application?
basics
~20 sThe application's own copy wins: Tomcat's web application class loader searches WEB-INF/classes and WEB-INF/lib before the shared loader that owns $CATALINA_BASE/lib. Both copies then exist as distinct classes, so objects crossing between container and application fail with ClassCastException or NoClassDefFoundError.
In IIS, what is an application pool, and how does it relate to the w3wp.exe worker process that actually runs your web application?
basics
~20 sAn IIS application pool is the isolation boundary for one or more web applications. IIS runs each pool in its own w3wp.exe worker process, so a crash, a recycle, or an identity change affects only the applications assigned to that pool.
Users of an ASP.NET application hosted on IIS report being randomly signed out during the day, and the first request each morning takes about thirty seconds. How do IIS application pool recycling and the idle time-out explain both symptoms, and what would you change?
basics
~20 sBoth symptoms come from the worker process going away. The IIS application pool idle time-out kills w3wp.exe after 20 minutes with no requests, and periodic recycling restarts it roughly every 29 hours, discarding in-process session state and forcing a cold start on the next request.
An application hosted on IIS gets Access Denied both when writing to a local folder and when reading a UNC file share, though the same code works when you run it interactively as yourself. Which identity is the request actually running under, and how do you grant each of those accesses correctly?
basics
~20 sBy default the code runs as the application pool's virtual account, named IIS APPPOOL<PoolName>. Grant local folder access to that name directly. It has no network identity, so a UNC share must instead be granted to the server's computer account — or the pool switched to a domain account.
You add a second website to an IIS server bound to port 443 and it will not start; the System event log says the WWW Publishing Service could not register the URL prefix. What does an IIS binding consist of, and how would you diagnose and resolve the conflict?
basics
~20 sAn IIS binding is the tuple protocol, IP address, port and host name (plus a certificate for HTTPS). Two sites whose tuples collide cannot both register their prefix with HTTP.sys, so the second fails to start. Give them distinct host names — with SNI enabled for HTTPS — or distinct IPs or ports.
The ASP.NET Core Module in IIS supports two hosting models, selected by the hostingModel attribute in web.config as inprocess or outofprocess. How do the two differ at runtime, and when would you choose each?
basics
~20 sOut-of-process, the IIS module launches your app as a separate process running Kestrel on a local port and reverse-proxies each request to it. In-process, it loads the runtime inside w3wp.exe and the app serves through IIS directly, which removes the extra hop and is faster.
In Istio, what do the PeerAuthentication modes STRICT, PERMISSIVE and DISABLE each do to inbound traffic for the workloads they select, and why can you enable mutual TLS without changing application code?
basics
~20 sIstio's PeerAuthentication sets what a workload's sidecar accepts on inbound connections: STRICT requires mutual TLS, PERMISSIVE accepts either mutual TLS or plaintext, DISABLE expects plaintext. The proxy performs the TLS, so application code is untouched.
After Istio injection, a Kubernetes pod that declares a single application container shows READY 2/2. What is the second container, and how does the application's traffic end up flowing through it without any change to the application code?
basics
~20 sThe second container is istio-proxy, an Envoy-based sidecar added by Istio's injection webhook when the pod is created. Injected rules in the pod's own network namespace redirect the pod's inbound and outbound TCP traffic through that proxy, so application code never changes.
You apply your first Istio AuthorizationPolicy with action ALLOW to one workload, and calls that previously worked start returning 403. Explain how Istio evaluates AuthorizationPolicy, including how the CUSTOM, DENY and ALLOW actions relate.
basics
~20 sOnce any ALLOW policy selects a workload, that workload becomes default-deny: anything not matched by an ALLOW rule is rejected with 403. Evaluation runs CUSTOM first, then DENY, then ALLOW, and a DENY match wins outright.
A newly created pod in a namespace you believe is part of the Istio mesh came up with no istio-proxy container. Explain how Istio decides which pods get a sidecar, and how you would find the reason this one did not.
basics
~20 sIstio injects through a mutating admission webhook selected by namespace labels — istio-injection=enabled or istio.io/rev=<revision> — with the pod-level sidecar.istio.io/inject label as an override. Check those labels, whether the pod predates them, revision mismatch after an upgrade, host-network pods, and webhook availability.
You add an Istio VirtualService that splits traffic 90/10 between subsets named v1 and v2 of a service, and every request to that service immediately starts returning 503. Which resource actually defines those subsets, and what are the two usual causes of the 503?
basics
~20 sSubsets are defined in a DestinationRule, not in the VirtualService. A weighted split fails with 503 either because no DestinationRule defines those subset names, or because a subset's label selector matches no running pods, leaving it with zero endpoints.
Linkerd ships its own data-plane sidecar, linkerd2-proxy, written in Rust, instead of reusing Envoy the way most service meshes do. What does that choice buy you operationally, and what do you give up?
basics
~20 sLinkerd's linkerd2-proxy is a Rust sidecar built for one job, so each pod costs far less memory and CPU and exposes a smaller attack surface. The price is extensibility: no Wasm or Lua filters, and a narrower protocol and feature set.
Your platform runs Linkerd today, and a team asks for a mesh capability Linkerd does not have. How do you decide between working around it, putting the capability somewhere else in the stack, or migrating the mesh to Istio?
basics
~20 sStart from what is genuinely missing. Push edge and gateway concerns into an ingress tier, keep Linkerd for in-cluster mTLS and metrics, and treat migration to Istio as justified only by structural gaps such as non-Kubernetes workloads or per-request token policy.
In Linkerd, what are the "golden metrics" that `linkerd viz stat` reports for a meshed workload, where do those numbers come from, and why might a meshed service show no success rate at all?
basics
~20 slinkerd viz stat reports success rate, requests per second and latency percentiles, computed from metrics that the linkerd2-proxy sidecars expose and the viz extension's Prometheus scrapes. A workload shows none of them when its traffic is not HTTP or gRPC.
Linkerd's automatic mTLS is built on a trust anchor certificate and an issuer certificate. Walk through how a meshed pod obtains its identity, and explain what happens across the cluster when the issuer certificate — or the trust anchor itself — expires.
basics
~20 sEach proxy gets a short-lived leaf certificate from Linkerd's identity service, proving its Kubernetes ServiceAccount identity and signed by the issuer under the trust anchor. If the issuer or the anchor expires, issuance stops and mTLS fails across the whole mesh.
A Linkerd ServiceProfile lets you mark a route `isRetryable` and configure a `retryBudget` rather than a fixed number of attempts. What does a retry budget actually enforce, and why is it preferred to "retry three times"?
basics
~20 sA retry budget caps retries as a proportion of ordinary requests — Linkerd's default allows roughly 20% extra plus a small floor — so a struggling dependency cannot be hit with a multiple of its normal load the way a fixed per-request retry count allows.
In Consul's service mesh, what is an intention, what identity does it match on, and what happens to a call between two mesh services when no intention matches it?
basics
~20 sA Consul intention is an authorization rule that permits or denies traffic from one mesh service to another. It matches the service identity carried in the sidecar's mTLS certificate rather than a source IP address. When nothing matches, Consul falls back to the ACL default_policy.
A service registered in Consul's service mesh has a sidecar proxy running, but its outbound calls still go straight to the destination's real address and never get mTLS. How is an application normally expected to address an upstream in Consul's mesh, and what does transparent proxy mode change?
basics
~20 sBy default Consul does not intercept outbound traffic. Each upstream is declared in the sidecar registration with a local_bind_port, and the application must dial 127.0.0.1 on that port. Transparent proxy mode instead installs iptables rules so all outbound traffic is redirected into the sidecar.
In a Consul cluster, what is the difference between a client agent and a server agent, and why does the standard deployment put an agent on every node instead of having applications talk directly to the servers?
basics
~20 sServer agents hold the catalog and replicate it through Raft with an elected leader. Client agents hold no catalog: they run local health checks, carry local registrations, take part in gossip, and forward requests to servers — which is why every node runs one.
Two instances of a service are registered in Consul and one instance's HTTP check has gone critical. Explain what a DNS lookup and the `/v1/health` and `/v1/catalog` HTTP endpoints each return now, and how that state differs from the instance having been deregistered.
basics
~20 sDNS and /v1/health/service/<name>?passing return only the healthy instance. /v1/catalog/service/<name> returns both, because the catalog lists registrations regardless of health. A critical instance is still registered and returns automatically on recovery; a deregistered one is gone until something registers it again.
You render an nginx upstream list from Consul with consul-template and reload nginx from the template's `command`. After an incident the rendered file came out with an empty upstream and every request failed. Walk through consul-template's render-and-reload cycle, and how you would make it safe.
basics
~20 sconsul-template holds a blocking query per dependency in the template, re-renders when one changes, writes the file atomically and then runs the command. It will happily render an empty list if Consul answers with zero results, so guard the render, validate the config, and only then reload.
Envoy can be configured from a static local file or dynamically through xDS. What is xDS, and what configuration does an xDS-driven Envoy still have to read from a local file?
basics
~20 sxDS is Envoy's family of discovery APIs: a management server streams listeners, routes, clusters and endpoints into a running proxy, applied with no restart. Only the bootstrap — node identity and how to reach that server — stays in a local file.
In an Envoy http_connection_manager, http_filters is an ordered list. Why must envoy.filters.http.router be the last entry, and in what order do the filters actually see a request versus its response?
basics
~20 sThe router is Envoy's terminal HTTP filter: it sends the request upstream and ends the chain, so anything listed after it can never run. Envoy rejects such a config. Filters see requests in listed order and responses in reverse order.
Trace a single HTTP request through Envoy's configuration objects, from the TCP port it arrives on to the backend instance that finally serves it. Which object handles each step, and what does each one own?
basics
~20 sA listener binds the port and selects a filter chain; the http_connection_manager network filter parses HTTP and runs the HTTP filters; its route_config picks a virtual host and a route that names a cluster; the cluster load-balances across its endpoints.
In an Envoy access log the %RESPONSE_FLAGS% field shows short codes such as UH, UF, UO, UT and URX. What does each one tell you about where the request actually died, and how do you use them to triage a burst of 503s?
basics
~20 sEnvoy's response flags name the proxy-side cause of an abnormal stream: UH no healthy upstream host, UF upstream connection failure, UO circuit-breaker overflow, UT upstream request timeout, URX retry limit reached. They distinguish upstream faults from Envoy's own decisions.
Envoy's xDS APIs are split into LDS, RDS, CDS and EDS (plus SDS). What does each one deliver, and how do they depend on one another?
basics
~20 sLDS delivers listeners, RDS the route tables they name, CDS the upstream clusters routes point at, EDS the endpoint addresses inside those clusters, and SDS the TLS secrets. The dependency runs listener to route to cluster to endpoint, which is why updates are ordered CDS, EDS, LDS, RDS.
A JVM service instance boots and registers itself with a Netflix Eureka server. Walk through what happens from that registration until another service is able to send it a request.
basics
~20 sThe instance posts its own metadata to the Eureka server and then heartbeats every 30 seconds to keep its lease alive. Callers download the whole registry, cache it in memory, and pick an instance themselves — Eureka never carries request traffic.
A service instance registered with Eureka is killed abruptly, yet callers keep sending it requests for well over a minute. Which Eureka timers stack up to produce that window, and how would you shorten it?
basics
~20 sFour delays compound: the 90-second lease must expire, the eviction task runs only every 60 seconds, the server's read-only response cache holds a stale answer for 30 seconds, and each client refetches the registry every 30 seconds.
What does self-preservation mode do on a Eureka server, what arithmetic triggers it, and why does it fire so readily in small or non-production deployments?
basics
~20 sWhen heartbeats received drop below about 85% of what the server expects, Eureka stops evicting expired leases and keeps serving the entries it already has. It is a deliberate choice of stale data over an empty registry under partition.
Your JVM services discover each other through Eureka today, and the platform is moving onto an orchestrator that already tracks which instances of each service are ready. How would you decide whether Eureka stays?
basics
~20 sDecide by asking what Eureka still knows that the platform does not. If everything lands in one cluster, the orchestrator's own readiness tracking makes Eureka a slower second source of truth and it should go; keep it only for reach beyond the cluster or for per-caller routing policy.
Two Eureka servers are configured as peers. An instance registers against server A, but a client reading server B does not see it. How does replication between Eureka peers actually work, and what would you check?
basics
~20 sEach Eureka server forwards writes directly to every configured peer over HTTP, asynchronously and best-effort, marked so the peer does not forward them again. There is no leader and no quorum, so peers converge eventually rather than immediately.
A reverse proxy load-balances across several backend instances and actively health-checks each one. What does the proxy do with a backend that starts failing those checks, and what has to happen before that backend receives traffic again?
basics
~20 sAfter a configured number of consecutive failed checks the proxy marks the backend unhealthy and stops sending it new requests, while continuing to probe it. It rejoins the pool only after a configured number of consecutive successful checks.
A reverse proxy can run at layer 4 (connection level) or layer 7 (request level). What can each one inspect and route on, and what does each one hand to the backend?
basics
~20 sA layer 4 proxy sees only connection data — source and destination IP and port, and for TLS the cleartext SNI hostname — and copies bytes through untouched. A layer 7 proxy parses each request, so it can route on path, method, headers or cookies.
A web application runs on two identical instances behind a load balancer that spreads requests round-robin. Users report being logged out at random. What is causing that, and what can the load-balancing layer do about it?
basics
~20 sEach instance keeps session state in its own memory, so round-robin sends the next request to an instance that never saw the login and treats the user as anonymous. At the proxy layer the fix is session affinity: pin a client to one backend.
Both a forward proxy and a reverse proxy sit between a client and a server and relay traffic. What actually distinguishes them — which side deploys and configures each, and what does each one hide from the other side?
basics
~20 sA forward proxy acts for the clients and is configured on the client side, so the origin server sees only the proxy. A reverse proxy acts for the service owner, is deployed in front of the backends, and the client never knows it exists.
A load balancer in front of your web servers is configured to "terminate TLS". Which parts of the path from the browser to the application are encrypted after that, and which are not?
basics
~20 sTerminating TLS means the load balancer holds the certificate's private key and completes the HTTPS handshake itself, so the browser-to-load-balancer hop is encrypted and the load-balancer-to-application hop is plain HTTP unless you separately encrypt it.