API Gateway

API 게이트웨이

One entry point applies authentication, rate limits, and service routing.

···
html
<div class="viz"><h3>REQUEST PIPELINE</h3><div class="row" id="pipe"><div class="box">client</div><div class="box" id="auth">auth</div><div class="box" id="limit">limit</div><div class="box" id="route">orders</div></div><div class="muted" id="result">request routed</div></div>
css
.viz{width:94%;height:88%;max-width:960px;padding:clamp(10px,2vmin,18px);border:1px solid var(--line);border-radius:14px;background:var(--surface);font:600 clamp(12px,1.35vw,16px)/1.35 var(--font-sans,system-ui,sans-serif);display:flex;flex-direction:column;gap:clamp(7px,1.8vmin,13px);overflow:hidden}.viz h3{margin:0;color:var(--accent);font:700 clamp(12px,1.35vw,16px)/1.2 var(--font-sans,system-ui,sans-serif);letter-spacing:.04em}.viz .row{display:flex;align-items:center;justify-content:center;gap:clamp(5px,1.4vmin,12px);flex:1;min-height:0}.viz .box{padding:clamp(5px,1.5vmin,12px);border:1px solid var(--line);border-radius:9px;background:var(--bg);text-align:center}.viz .muted{color:var(--muted)}.viz .accent{color:var(--accent)}.viz .code{font-family:ui-monospace,monospace}.viz .pill{padding:3px 7px;border:1px solid var(--line);border-radius:99px;white-space:nowrap}.viz .active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface))}.viz .arrow{color:var(--accent);font:700 18px ui-monospace,monospace}#pipe{gap:4px}#pipe .box{min-width:20%;padding:7px 2px;transition:background .3s,border-color .3s}#pipe .on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 18%,var(--surface))}
js
let n=0;const ids=['auth','limit','route'];function draw(){ids.forEach((id,i)=>document.getElementById(id).classList.toggle('on',i===n%4));document.getElementById('result').textContent=n%4===3?'missing key → stopped at auth':n%4===2?'request routed to orders':'checking '+ids[n%4];n++}draw();setInterval(draw,800)

An API gateway sits in front of backend services to perform common checks and forward requests. Clients use one entry address; the gateway authenticates or limits calls before routing by path. This reduces duplicated cross-cutting logic in services.

The demo passes a call through authentication and rate limiting toward an order service, then stops an uncredentialed call at the first check. Operate and observe the gateway so it does not become a bottleneck or single point of failure.

When to use

Use it when multiple services share public entry, authentication, and limit policies.

Open as page ↗