All jobs / Backend developer / Architecture
Backend developer interview question · 5+ years
The interviewer asks: “Auth, TLS, and WAF — in every service or at the gateway?” Strongest answer?
The strongest answer
Both, with a split: the gateway handles TLS, edge rate limits, and coarse authn; each service still authorises its resources and never trusts the network alone. I don't make the mesh the only control or the app the only control.
Why it works
Exactly. Defence in depth. Edge for the internet-shaped problems; service for IDOR and domain policy. Zero-trust internals in 2026 still assume a stolen sidecar.
What a good answer covers
- Gateway: TLS, coarse authn, edge limits.
- Service: resource authz, domain rules.
- Don't trust “internal.”
- Don't duplicate or delete the edge on a whim.
Answers that fall short
- Close, but not the strongest: The gateway is enough; internal traffic is trusted.
Internal trusted networks are how a SSRF becomes every datastore. Authenticate east-west. - Weak: Every service terminates public TLS and copies the WAF rules.
Duplicating WAF in 40 languages is how rules drift. Centralise the boring edge; keep domain authz local. - Red flag: Disable the gateway so latency drops; the app JWT check is plenty.
Dropping the gateway for latency throws away a uniform control plane. Measure, don't strip.
Who gets asked this
More Architecture questions
- An interviewer says: “Design a URL shortener.” What do you do first?
- What does a load balancer do, and what does it not do?
- What is the difference between scaling up and scaling out?
- Why do interviewers keep asking whether a service is stateless?
- When does adding a cache help, and when does it not?
- In a design, why do you say which columns are indexed?
- What is a read replica for?
- Why would you put a queue between two parts of a system?