엣지 렌더링은 중앙 서버 대신 여러 지역의 엣지 런타임에서 요청을 처리하고 HTML을 만듭니다. 가까운 위치에서 응답을 시작하면 네트워크 왕복 시간을 줄일 수 있습니다.
데이터베이스가 먼 지역에만 있으면 서버 위치만 옮겨서는 효과가 작거나 역전될 수 있습니다. 데이터 위치, 캐시, 런타임 API 제한을 함께 검토해야 합니다.
언제 쓰나
여러 지역 방문자에게 요청별 HTML을 제공하고 데이터도 가까이 있거나 캐시할 수 있을 때 사용합니다.
이용자와 가까운 엣지 실행 위치에서 요청별 HTML을 생성해 왕복 거리를 줄입니다.
<section class="stage"><div class="heading">EDGE RENDERING <span class="hint">location changes path</span></div><div class="edge-map"><div class="point visitor">VISITOR</div><div class="paths"><div class="path central"><span>CENTRAL</span><i></i></div><div class="path nearby"><span>NEAR EDGE</span><i></i></div></div><div class="point page">HTML</div></div><div class="edge-readout" id="edge-readout">Central route crosses a long path</div><div class="caption">Data must be nearby too</div></section>.stage{width:min(94vw,780px);height:min(88vh,322px);padding:clamp(12px,3vmin,20px);border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 12px 36px #0001;display:flex;flex-direction:column;gap:clamp(7px,2vmin,14px);font:500 clamp(12px,3.5vmin,17px)/1.3 var(--font-sans,system-ui,sans-serif);overflow:hidden}.heading{display:flex;justify-content:space-between;align-items:center;gap:8px;font-weight:750;color:var(--accent)}.hint{color:var(--muted);font-size:clamp(12px,3.2vmin,14px);font-weight:500}.caption{margin-top:auto;color:var(--muted);font-size:clamp(12px,3.2vmin,14px)}.row{display:flex;gap:clamp(5px,1.5vmin,12px);align-items:center}.tile{padding:clamp(6px,1.8vmin,13px);border:1px solid var(--line);border-radius:9px;background:var(--bg);text-align:center;min-width:0}.arrow{color:var(--accent);font-weight:800}.stage [data-on]{transition:background .3s,border-color .3s,opacity .3s,transform .3s}.stage .on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--surface));color:var(--accent)}.edge-map{flex:1;display:flex;align-items:center;justify-content:center;gap:clamp(5px,2vmin,16px);min-height:70px}.point{padding:8px 5px;border:1px solid var(--line);border-radius:7px;background:var(--bg);font-weight:750;text-align:center;width:25%}.paths{width:44%;display:flex;flex-direction:column;gap:12px}.path{display:flex;align-items:center;gap:5px;opacity:.35;transition:opacity .3s}.path span{font-size:clamp(12px,3vmin,14px);white-space:nowrap;width:78px}.path i{height:5px;border-radius:5px;background:var(--accent);flex:1;transform-origin:left;transform:scaleX(.2);transition:transform .5s}.path.central i{background:var(--accent-3)}.stage[data-step="0"] .central,.stage[data-step="1"] .nearby{opacity:1}.stage[data-step="0"] .central i{transform:scaleX(1)}.stage[data-step="1"] .nearby i{transform:scaleX(.52)}.edge-readout{text-align:center;color:var(--accent-2);font-weight:700;font-size:clamp(12px,3vmin,14px)}.stage small,.stage button,.stage .cards b,.stage .phase b,.stage .pair b,.stage .tree-mini b{font-size:clamp(12px,3.2vmin,14px)!important}const stage=document.querySelector(".stage"),readout=document.getElementById("edge-readout");let step=0;function tick(){stage.dataset.step=String(step);readout.textContent=step?"Nearby edge starts the response sooner":"Central route crosses a long path";step=1-step}tick();const timer=setInterval(tick,1200);stage.addEventListener("pointerdown",()=>{clearInterval(timer);tick()})엣지 렌더링은 중앙 서버 대신 여러 지역의 엣지 런타임에서 요청을 처리하고 HTML을 만듭니다. 가까운 위치에서 응답을 시작하면 네트워크 왕복 시간을 줄일 수 있습니다.
데이터베이스가 먼 지역에만 있으면 서버 위치만 옮겨서는 효과가 작거나 역전될 수 있습니다. 데이터 위치, 캐시, 런타임 API 제한을 함께 검토해야 합니다.
여러 지역 방문자에게 요청별 HTML을 제공하고 데이터도 가까이 있거나 캐시할 수 있을 때 사용합니다.