글

10월, 2026의 게시물 표시

What Is a Reverse Proxy - and When You Actually Don't Need One

이미지
A reverse proxy is a server that sits in front of your application and accepts requests on its behalf. The client connects to the reverse proxy, the reverse proxy decides which backend should handle the request, forwards it, and relays the response back — so from the outside, your whole system looks like a single host. The name is backwards-sounding for a reason. A forward proxy acts on behalf of the client (your corporate network's outbound proxy, a VPN exit). A reverse proxy acts on behalf of the server , and the client usually has no idea it exists. It exists to solve one problem: the public-facing concerns of serving traffic — TLS, routing, retries, rate limits, caching, who gets which backend — are the same no matter what your application does, and you do not want to reimplement them inside every service. The reverse proxy is where you put them once. That consolidation is also the cost. You have added a hop that every single request passes through, and it can fail, misrou...

What Is a Load Balancer - and When You Actually Don't Need One

이미지
A load balancer sits in front of a group of servers, takes every incoming request, and decides which server handles it. That is the whole job: one address on the outside, many machines on the inside. It exists because a single server has a ceiling and a single point of failure. Once you run two copies of your application, something has to answer the question "which copy?" on every request — and that something also has to notice when one of the copies stops answering and quietly stop sending traffic there. The second half is usually the reason people adopt one. Spreading load is the advertised feature; removing a dead server from rotation without a human waking up is the part you actually buy. What follows is the mechanism, the operational costs it adds, and the scale below which running one is just extra moving parts. Concept Load Balancer (LB) Where it sits Infrastructure — sits at the network edge, between clients and your application instances In one sentence ...

What Is Cache Invalidation - and When You Actually Don't Need It

이미지
What is cache invalidation ? It is the part of a caching system that decides when a cached copy of data is no longer trustworthy, and what to do about it. Cache invalidation exists because a cache is a second copy of the truth, and the moment the first copy changes, the second one is lying. The lie is usually harmless. A product description that is thirty seconds out of date costs nothing. A permissions check that is thirty seconds out of date can be an incident. Invalidation is how you choose which of those you are living with. Almost every caching bug in production is really an invalidation bug. The read path was easy; the hard part was noticing that something changed, in a system where the thing that changed and the thing holding the copy do not know about each other. This page covers the mechanism, the standard cache invalidation strategies and what each one costs, and the fairly large set of cases where the honest answer is to use a short expiry and stop thinking about it. ...

What Is HTTP Caching - and When You Actually Don't Need It

이미지
HTTP caching is the part of the HTTP protocol that lets a browser, a proxy, or a CDN reuse a response it already holds instead of asking your server for it again. When someone asks what is HTTP caching doing in their architecture diagram, the honest answer is that it is a contract : your server attaches headers describing how long a response may be reused and how to check whether it is still good, and every cache along the path obeys that contract. It exists to solve one problem: the same bytes being computed and shipped over and over. A product image, a JavaScript bundle, a catalogue page that changes twice a day - all of these get requested far more often than they change, and every repeat is latency for the user and load for you. The cost is that you no longer control when a client stops seeing an old version. Caching trades freshness for latency and load , and the whole design of the headers is about letting you choose that tradeoff per response instead of globally. Conce...

What Is Idempotency in REST APIs - and When You Don't Need an Idempotency Key

이미지
Ask what is idempotency in REST APIs and you will get the textbook line: an operation is idempotent if performing it twice leaves the system in the same state as performing it once. That is correct, and it is also why most engineers hear the word, nod, and still ship an endpoint that charges a customer twice. The reason the concept exists is narrower than the definition suggests. Over a network, a client that sends a write and gets a timeout does not know whether the write happened. It has two bad options: retry and risk a duplicate, or give up and risk losing the operation. Idempotency is the property that removes that dilemma. If retrying is harmless, the client can always retry. Everything else on this page - idempotency keys , key tables, stored responses - is machinery for giving that property to operations that do not have it naturally. Concept Idempotency (and the idempotency key) Where it sits API design - sits at the write path of your HTTP handler, between the retry...