[{"data":1,"prerenderedAt":2255},["ShallowReactive",2],{"article-alternates":3,"article-\u002Ftr\u002Ftech\u002Fedge-ssr-ile-personalizasyon-latencysini-40msye-dusurmek":13},{"i18nKey":4,"paths":5},"tech-003-2026-05",{"de":6,"en":7,"es":8,"fr":9,"it":10,"ru":11,"tr":12},"\u002Fde\u002Ftech\u002Fedge-ssr-personalisierung-latenz-40ms","\u002Fen\u002Ftech\u002Fedge-ssr-personalization-40ms-latency","\u002Fes\u002Ftech\u002Freducir-latencia-personalizacion-edge-ssr-40ms","\u002Ffr\u002Ftech\u002Fedge-ssr-personalizasyon-latency-40ms","\u002Fit\u002Ftech\u002Fedge-ssr-personalization-40ms","\u002Fru\u002Ftech\u002Fedge-ssr-snizit-personalizacija-latenciju-40ms","\u002Ftr\u002Ftech\u002Fedge-ssr-ile-personalizasyon-latencysini-40msye-dusurmek",{"_path":12,"_dir":14,"_draft":15,"_partial":15,"_locale":16,"title":17,"description":18,"publishedAt":19,"modifiedAt":19,"category":14,"i18nKey":4,"tags":20,"readingTime":26,"author":27,"body":28,"_type":2249,"_id":2250,"_source":2251,"_file":2252,"_stem":2253,"_extension":2254},"tech",false,"","Edge SSR ile Personalizasyon Latency'sini 40ms'ye Düşürmek","Cloudflare Workers ve Vercel Edge ile KV store mimarisini kullanarak sunucu taraflı personalizasyon gecikme süresini 40 milisaniyenin altına indirmek mümkün.","2026-05-12",[21,22,23,24,25],"edge-computing","ssr","personalization","cloudflare-workers","vercel-edge",8,"Roibase",{"type":29,"children":30,"toc":2237},"root",[31,39,46,51,56,72,78,83,536,541,548,553,660,673,679,684,689,730,890,903,908,914,919,927,932,1173,1178,1184,1189,1200,1453,1458,1468,1688,1701,1837,1842,1848,1853,1861,1866,2123,2128,2152,2157,2163,2168,2221,2226,2231],{"type":32,"tag":33,"props":34,"children":35},"element","p",{},[36],{"type":37,"value":38},"text","Geleneksel origin server'larla yapılan sunucu taraflı render, ortalama 200-400ms latency demek. Bir CDN edge'de HTML cache'lersen bu süre 20-50ms'ye düşer ama personalizasyon kaybolur. Edge SSR bu tradeoff'u kırıyor: hem kişiselleştirme hem 40ms altı response. Bunu Cloudflare Workers ve Vercel Edge gibi edge runtime'lar + distributed KV store ile yapıyorsun. Artık \"cache mi, personalization mi\" sorusunu sormuyorsun — ikisini de alıyorsun.",{"type":32,"tag":40,"props":41,"children":43},"h2",{"id":42},"edge-ssr-neden-şimdi-kritik",[44],{"type":37,"value":45},"Edge SSR neden şimdi kritik",{"type":32,"tag":33,"props":47,"children":48},{},[49],{"type":37,"value":50},"2025'ten itibaren Chrome'un INP metriği Core Web Vitals'a girdi. 200ms üstü server response INP'yi tek başına kırmaya yetiyor. Origin'e giden her request 150-300ms ekliyor çünkü fiziksel mesafe + cold start var. Edge runtime bu engeli kaldırıyor: kod kullanıcıya en yakın POP'ta (Point of Presence) çalışıyor, data aynı bölgedeki KV store'dan 5-15ms'de geliyor.",{"type":32,"tag":33,"props":52,"children":53},{},[54],{"type":37,"value":55},"Bu sadece hız değil. Personalizasyon için artık origin'e istek atmana gerek yok. User segment, tercih, sepet durumu gibi datayı edge KV'de tutuyorsun. Request geldiğinde edge function bu datayı çekip HTML'i anında render ediyor. Origin server sadece write işlemleri ve ağır computation için kullanılıyor.",{"type":32,"tag":33,"props":57,"children":58},{},[59,61,70],{"type":37,"value":60},"Shopify gibi platformlarla çalışırken bu mimari özellikle önemli. Liquid template'ler origin'de render olur, her sayfa için 300-600ms sürer. Edge SSR ile HTML composable yapıyorsun: ürün kartını bir edge function render ediyor, sepet bilgisini başka bir function inject ediyor. Toplam latency 40ms altına iniyor. Detaylı entegrasyon yapısı için ",{"type":32,"tag":62,"props":63,"children":67},"a",{"href":64,"rel":65},"https:\u002F\u002Fwww.roibase.com.tr\u002Ftr\u002Fheadless",[66],"nofollow",[68],{"type":37,"value":69},"Headless Commerce",{"type":37,"value":71}," mimarisine bakabilirsin.",{"type":32,"tag":40,"props":73,"children":75},{"id":74},"cloudflare-workers-kv-mimari-çekirdek",[76],{"type":37,"value":77},"Cloudflare Workers + KV: mimari çekirdek",{"type":32,"tag":33,"props":79,"children":80},{},[81],{"type":37,"value":82},"Cloudflare Workers V8 isolate bazlı çalışır. Her request için yeni container spin-up etmez, JavaScript isolate açar. Bunun maliyeti 0.5-2ms. Worker kodu şu şekilde:",{"type":32,"tag":84,"props":85,"children":89},"pre",{"code":86,"language":87,"meta":16,"className":88,"style":16},"export default {\n  async fetch(request, env) {\n    const url = new URL(request.url);\n    const userId = request.headers.get('CF-Connecting-IP') || 'anonymous';\n    \n    \u002F\u002F KV'den user segment çek\n    const segment = await env.USER_SEGMENTS.get(userId);\n    \n    \u002F\u002F Segment'e göre product list render et\n    const products = segment === 'premium' \n      ? await fetchPremiumProducts() \n      : await fetchStandardProducts();\n    \n    const html = renderHTML(products, segment);\n    \n    return new Response(html, {\n      headers: { 'Content-Type': 'text\u002Fhtml; charset=utf-8' }\n    });\n  }\n};\n","javascript","language-javascript shiki shiki-themes github-dark",[90],{"type":32,"tag":91,"props":92,"children":93},"code",{"__ignoreMap":16},[94,117,158,193,250,259,269,315,322,331,368,391,414,422,449,457,480,509,518,527],{"type":32,"tag":95,"props":96,"children":99},"span",{"class":97,"line":98},"line",1,[100,106,111],{"type":32,"tag":95,"props":101,"children":103},{"style":102},"--shiki-default:#F97583",[104],{"type":37,"value":105},"export",{"type":32,"tag":95,"props":107,"children":108},{"style":102},[109],{"type":37,"value":110}," default",{"type":32,"tag":95,"props":112,"children":114},{"style":113},"--shiki-default:#E1E4E8",[115],{"type":37,"value":116}," {\n",{"type":32,"tag":95,"props":118,"children":120},{"class":97,"line":119},2,[121,126,132,137,143,148,153],{"type":32,"tag":95,"props":122,"children":123},{"style":102},[124],{"type":37,"value":125},"  async",{"type":32,"tag":95,"props":127,"children":129},{"style":128},"--shiki-default:#B392F0",[130],{"type":37,"value":131}," fetch",{"type":32,"tag":95,"props":133,"children":134},{"style":113},[135],{"type":37,"value":136},"(",{"type":32,"tag":95,"props":138,"children":140},{"style":139},"--shiki-default:#FFAB70",[141],{"type":37,"value":142},"request",{"type":32,"tag":95,"props":144,"children":145},{"style":113},[146],{"type":37,"value":147},", ",{"type":32,"tag":95,"props":149,"children":150},{"style":139},[151],{"type":37,"value":152},"env",{"type":32,"tag":95,"props":154,"children":155},{"style":113},[156],{"type":37,"value":157},") {\n",{"type":32,"tag":95,"props":159,"children":161},{"class":97,"line":160},3,[162,167,173,178,183,188],{"type":32,"tag":95,"props":163,"children":164},{"style":102},[165],{"type":37,"value":166},"    const",{"type":32,"tag":95,"props":168,"children":170},{"style":169},"--shiki-default:#79B8FF",[171],{"type":37,"value":172}," url",{"type":32,"tag":95,"props":174,"children":175},{"style":102},[176],{"type":37,"value":177}," =",{"type":32,"tag":95,"props":179,"children":180},{"style":102},[181],{"type":37,"value":182}," new",{"type":32,"tag":95,"props":184,"children":185},{"style":128},[186],{"type":37,"value":187}," URL",{"type":32,"tag":95,"props":189,"children":190},{"style":113},[191],{"type":37,"value":192},"(request.url);\n",{"type":32,"tag":95,"props":194,"children":196},{"class":97,"line":195},4,[197,201,206,210,215,220,224,230,235,240,245],{"type":32,"tag":95,"props":198,"children":199},{"style":102},[200],{"type":37,"value":166},{"type":32,"tag":95,"props":202,"children":203},{"style":169},[204],{"type":37,"value":205}," userId",{"type":32,"tag":95,"props":207,"children":208},{"style":102},[209],{"type":37,"value":177},{"type":32,"tag":95,"props":211,"children":212},{"style":113},[213],{"type":37,"value":214}," request.headers.",{"type":32,"tag":95,"props":216,"children":217},{"style":128},[218],{"type":37,"value":219},"get",{"type":32,"tag":95,"props":221,"children":222},{"style":113},[223],{"type":37,"value":136},{"type":32,"tag":95,"props":225,"children":227},{"style":226},"--shiki-default:#9ECBFF",[228],{"type":37,"value":229},"'CF-Connecting-IP'",{"type":32,"tag":95,"props":231,"children":232},{"style":113},[233],{"type":37,"value":234},") ",{"type":32,"tag":95,"props":236,"children":237},{"style":102},[238],{"type":37,"value":239},"||",{"type":32,"tag":95,"props":241,"children":242},{"style":226},[243],{"type":37,"value":244}," 'anonymous'",{"type":32,"tag":95,"props":246,"children":247},{"style":113},[248],{"type":37,"value":249},";\n",{"type":32,"tag":95,"props":251,"children":253},{"class":97,"line":252},5,[254],{"type":32,"tag":95,"props":255,"children":256},{"style":113},[257],{"type":37,"value":258},"    \n",{"type":32,"tag":95,"props":260,"children":262},{"class":97,"line":261},6,[263],{"type":32,"tag":95,"props":264,"children":266},{"style":265},"--shiki-default:#6A737D",[267],{"type":37,"value":268},"    \u002F\u002F KV'den user segment çek\n",{"type":32,"tag":95,"props":270,"children":272},{"class":97,"line":271},7,[273,277,282,286,291,296,301,306,310],{"type":32,"tag":95,"props":274,"children":275},{"style":102},[276],{"type":37,"value":166},{"type":32,"tag":95,"props":278,"children":279},{"style":169},[280],{"type":37,"value":281}," segment",{"type":32,"tag":95,"props":283,"children":284},{"style":102},[285],{"type":37,"value":177},{"type":32,"tag":95,"props":287,"children":288},{"style":102},[289],{"type":37,"value":290}," await",{"type":32,"tag":95,"props":292,"children":293},{"style":113},[294],{"type":37,"value":295}," env.",{"type":32,"tag":95,"props":297,"children":298},{"style":169},[299],{"type":37,"value":300},"USER_SEGMENTS",{"type":32,"tag":95,"props":302,"children":303},{"style":113},[304],{"type":37,"value":305},".",{"type":32,"tag":95,"props":307,"children":308},{"style":128},[309],{"type":37,"value":219},{"type":32,"tag":95,"props":311,"children":312},{"style":113},[313],{"type":37,"value":314},"(userId);\n",{"type":32,"tag":95,"props":316,"children":317},{"class":97,"line":26},[318],{"type":32,"tag":95,"props":319,"children":320},{"style":113},[321],{"type":37,"value":258},{"type":32,"tag":95,"props":323,"children":325},{"class":97,"line":324},9,[326],{"type":32,"tag":95,"props":327,"children":328},{"style":265},[329],{"type":37,"value":330},"    \u002F\u002F Segment'e göre product list render et\n",{"type":32,"tag":95,"props":332,"children":334},{"class":97,"line":333},10,[335,339,344,348,353,358,363],{"type":32,"tag":95,"props":336,"children":337},{"style":102},[338],{"type":37,"value":166},{"type":32,"tag":95,"props":340,"children":341},{"style":169},[342],{"type":37,"value":343}," products",{"type":32,"tag":95,"props":345,"children":346},{"style":102},[347],{"type":37,"value":177},{"type":32,"tag":95,"props":349,"children":350},{"style":113},[351],{"type":37,"value":352}," segment ",{"type":32,"tag":95,"props":354,"children":355},{"style":102},[356],{"type":37,"value":357},"===",{"type":32,"tag":95,"props":359,"children":360},{"style":226},[361],{"type":37,"value":362}," 'premium'",{"type":32,"tag":95,"props":364,"children":365},{"style":113},[366],{"type":37,"value":367}," \n",{"type":32,"tag":95,"props":369,"children":371},{"class":97,"line":370},11,[372,377,381,386],{"type":32,"tag":95,"props":373,"children":374},{"style":102},[375],{"type":37,"value":376},"      ?",{"type":32,"tag":95,"props":378,"children":379},{"style":102},[380],{"type":37,"value":290},{"type":32,"tag":95,"props":382,"children":383},{"style":128},[384],{"type":37,"value":385}," fetchPremiumProducts",{"type":32,"tag":95,"props":387,"children":388},{"style":113},[389],{"type":37,"value":390},"() \n",{"type":32,"tag":95,"props":392,"children":394},{"class":97,"line":393},12,[395,400,404,409],{"type":32,"tag":95,"props":396,"children":397},{"style":102},[398],{"type":37,"value":399},"      :",{"type":32,"tag":95,"props":401,"children":402},{"style":102},[403],{"type":37,"value":290},{"type":32,"tag":95,"props":405,"children":406},{"style":128},[407],{"type":37,"value":408}," fetchStandardProducts",{"type":32,"tag":95,"props":410,"children":411},{"style":113},[412],{"type":37,"value":413},"();\n",{"type":32,"tag":95,"props":415,"children":417},{"class":97,"line":416},13,[418],{"type":32,"tag":95,"props":419,"children":420},{"style":113},[421],{"type":37,"value":258},{"type":32,"tag":95,"props":423,"children":425},{"class":97,"line":424},14,[426,430,435,439,444],{"type":32,"tag":95,"props":427,"children":428},{"style":102},[429],{"type":37,"value":166},{"type":32,"tag":95,"props":431,"children":432},{"style":169},[433],{"type":37,"value":434}," html",{"type":32,"tag":95,"props":436,"children":437},{"style":102},[438],{"type":37,"value":177},{"type":32,"tag":95,"props":440,"children":441},{"style":128},[442],{"type":37,"value":443}," renderHTML",{"type":32,"tag":95,"props":445,"children":446},{"style":113},[447],{"type":37,"value":448},"(products, segment);\n",{"type":32,"tag":95,"props":450,"children":452},{"class":97,"line":451},15,[453],{"type":32,"tag":95,"props":454,"children":455},{"style":113},[456],{"type":37,"value":258},{"type":32,"tag":95,"props":458,"children":460},{"class":97,"line":459},16,[461,466,470,475],{"type":32,"tag":95,"props":462,"children":463},{"style":102},[464],{"type":37,"value":465},"    return",{"type":32,"tag":95,"props":467,"children":468},{"style":102},[469],{"type":37,"value":182},{"type":32,"tag":95,"props":471,"children":472},{"style":128},[473],{"type":37,"value":474}," Response",{"type":32,"tag":95,"props":476,"children":477},{"style":113},[478],{"type":37,"value":479},"(html, {\n",{"type":32,"tag":95,"props":481,"children":483},{"class":97,"line":482},17,[484,489,494,499,504],{"type":32,"tag":95,"props":485,"children":486},{"style":113},[487],{"type":37,"value":488},"      headers: { ",{"type":32,"tag":95,"props":490,"children":491},{"style":226},[492],{"type":37,"value":493},"'Content-Type'",{"type":32,"tag":95,"props":495,"children":496},{"style":113},[497],{"type":37,"value":498},": ",{"type":32,"tag":95,"props":500,"children":501},{"style":226},[502],{"type":37,"value":503},"'text\u002Fhtml; charset=utf-8'",{"type":32,"tag":95,"props":505,"children":506},{"style":113},[507],{"type":37,"value":508}," }\n",{"type":32,"tag":95,"props":510,"children":512},{"class":97,"line":511},18,[513],{"type":32,"tag":95,"props":514,"children":515},{"style":113},[516],{"type":37,"value":517},"    });\n",{"type":32,"tag":95,"props":519,"children":521},{"class":97,"line":520},19,[522],{"type":32,"tag":95,"props":523,"children":524},{"style":113},[525],{"type":37,"value":526},"  }\n",{"type":32,"tag":95,"props":528,"children":530},{"class":97,"line":529},20,[531],{"type":32,"tag":95,"props":532,"children":533},{"style":113},[534],{"type":37,"value":535},"};\n",{"type":32,"tag":33,"props":537,"children":538},{},[539],{"type":37,"value":540},"Cloudflare KV 300+ POP'ta replicate ediyor. Read latency global ortalama 12ms. Write eventual consistency ile 60 saniyede yayılıyor. Bu yüzden KV'ye sadece nadir değişen data yazıyorsun: user preferences, segment mappings, feature flags. Ürün fiyatı gibi sık değişen datayı origin API'den çekip edge'de cache'liyorsun (Cache API ile 60 saniye TTL).",{"type":32,"tag":542,"props":543,"children":545},"h3",{"id":544},"vercel-edge-vs-cloudflare-workers",[546],{"type":37,"value":547},"Vercel Edge vs Cloudflare Workers",{"type":32,"tag":33,"props":549,"children":550},{},[551],{"type":37,"value":552},"Vercel Edge Functions aynı V8 isolate modelini kullanır ama ağı farklı. Cloudflare 300+ POP, Vercel ~15 regional edge location. Latency karşılaştırması (Avrupa kullanıcı, ABD origin):",{"type":32,"tag":554,"props":555,"children":556},"table",{},[557,586],{"type":32,"tag":558,"props":559,"children":560},"thead",{},[561],{"type":32,"tag":562,"props":563,"children":564},"tr",{},[565,571,576,581],{"type":32,"tag":566,"props":567,"children":568},"th",{},[569],{"type":37,"value":570},"Runtime",{"type":32,"tag":566,"props":572,"children":573},{},[574],{"type":37,"value":575},"Cold Start",{"type":32,"tag":566,"props":577,"children":578},{},[579],{"type":37,"value":580},"KV Read",{"type":32,"tag":566,"props":582,"children":583},{},[584],{"type":37,"value":585},"Total TTFB",{"type":32,"tag":587,"props":588,"children":589},"tbody",{},[590,614,637],{"type":32,"tag":562,"props":591,"children":592},{},[593,599,604,609],{"type":32,"tag":594,"props":595,"children":596},"td",{},[597],{"type":37,"value":598},"Origin SSR",{"type":32,"tag":594,"props":600,"children":601},{},[602],{"type":37,"value":603},"150ms",{"type":32,"tag":594,"props":605,"children":606},{},[607],{"type":37,"value":608},"N\u002FA",{"type":32,"tag":594,"props":610,"children":611},{},[612],{"type":37,"value":613},"380ms",{"type":32,"tag":562,"props":615,"children":616},{},[617,622,627,632],{"type":32,"tag":594,"props":618,"children":619},{},[620],{"type":37,"value":621},"Vercel Edge",{"type":32,"tag":594,"props":623,"children":624},{},[625],{"type":37,"value":626},"8ms",{"type":32,"tag":594,"props":628,"children":629},{},[630],{"type":37,"value":631},"22ms",{"type":32,"tag":594,"props":633,"children":634},{},[635],{"type":37,"value":636},"45ms",{"type":32,"tag":562,"props":638,"children":639},{},[640,645,650,655],{"type":32,"tag":594,"props":641,"children":642},{},[643],{"type":37,"value":644},"Cloudflare Workers",{"type":32,"tag":594,"props":646,"children":647},{},[648],{"type":37,"value":649},"1ms",{"type":32,"tag":594,"props":651,"children":652},{},[653],{"type":37,"value":654},"11ms",{"type":32,"tag":594,"props":656,"children":657},{},[658],{"type":37,"value":659},"28ms",{"type":32,"tag":33,"props":661,"children":662},{},[663,665,671],{"type":37,"value":664},"Vercel'in avantajı Next.js ekosistemiyle deep integration. ",{"type":32,"tag":91,"props":666,"children":668},{"className":667},[],[669],{"type":37,"value":670},"middleware.ts",{"type":37,"value":672}," dosyasında edge function yazıp production'a push ediyorsun, orchestration Vercel'de. Cloudflare'de Wrangler CLI + manuel KV binding yapman gerekiyor. Tradeoff: daha fazla kontrol vs daha hızlı onboarding.",{"type":32,"tag":40,"props":674,"children":676},{"id":675},"kv-store-mimarisi-write-pattern-ve-revalidation",[677],{"type":37,"value":678},"KV store mimarisi: write pattern ve revalidation",{"type":32,"tag":33,"props":680,"children":681},{},[682],{"type":37,"value":683},"Edge KV'nin eventual consistency'si bir constraint. User bir butona tıkladı, preference değişti — bu değişiklik 60 saniye içinde tüm edge'lere yayılır. Bu süre zarfında farklı POP'lar farklı değer okuyabilir. Çözüm: write'tan sonra origin'e redirect et veya client-side optimistic update yap.",{"type":32,"tag":33,"props":685,"children":686},{},[687],{"type":37,"value":688},"Örnek flow:",{"type":32,"tag":690,"props":691,"children":692},"ol",{},[693,699,712,725],{"type":32,"tag":694,"props":695,"children":696},"li",{},[697],{"type":37,"value":698},"User \"Dark Mode\" toggle'ına basar",{"type":32,"tag":694,"props":700,"children":701},{},[702,704,710],{"type":37,"value":703},"Client POST ",{"type":32,"tag":91,"props":705,"children":707},{"className":706},[],[708],{"type":37,"value":709},"\u002Fapi\u002Fpreferences",{"type":37,"value":711}," endpoint'ine gönderir (origin)",{"type":32,"tag":694,"props":713,"children":714},{},[715,717,723],{"type":37,"value":716},"Origin KV'ye ",{"type":32,"tag":91,"props":718,"children":720},{"className":719},[],[721],{"type":37,"value":722},"user:123:theme = dark",{"type":37,"value":724}," yazar",{"type":32,"tag":694,"props":726,"children":727},{},[728],{"type":37,"value":729},"Origin immediate cache invalidation için Cloudflare API'yi çağırır:",{"type":32,"tag":84,"props":731,"children":733},{"code":732,"language":87,"meta":16,"className":88,"style":16},"\u002F\u002F Origin'de\nawait fetch(`https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${zoneId}\u002Fpurge_cache`, {\n  method: 'POST',\n  headers: { 'Authorization': `Bearer ${apiToken}` },\n  body: JSON.stringify({ files: [`https:\u002F\u002Fexample.com\u002Fuser\u002F${userId}`] })\n});\n",[734],{"type":32,"tag":91,"props":735,"children":736},{"__ignoreMap":16},[737,745,781,799,836,882],{"type":32,"tag":95,"props":738,"children":739},{"class":97,"line":98},[740],{"type":32,"tag":95,"props":741,"children":742},{"style":265},[743],{"type":37,"value":744},"\u002F\u002F Origin'de\n",{"type":32,"tag":95,"props":746,"children":747},{"class":97,"line":119},[748,753,757,761,766,771,776],{"type":32,"tag":95,"props":749,"children":750},{"style":102},[751],{"type":37,"value":752},"await",{"type":32,"tag":95,"props":754,"children":755},{"style":128},[756],{"type":37,"value":131},{"type":32,"tag":95,"props":758,"children":759},{"style":113},[760],{"type":37,"value":136},{"type":32,"tag":95,"props":762,"children":763},{"style":226},[764],{"type":37,"value":765},"`https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Fzones\u002F${",{"type":32,"tag":95,"props":767,"children":768},{"style":113},[769],{"type":37,"value":770},"zoneId",{"type":32,"tag":95,"props":772,"children":773},{"style":226},[774],{"type":37,"value":775},"}\u002Fpurge_cache`",{"type":32,"tag":95,"props":777,"children":778},{"style":113},[779],{"type":37,"value":780},", {\n",{"type":32,"tag":95,"props":782,"children":783},{"class":97,"line":160},[784,789,794],{"type":32,"tag":95,"props":785,"children":786},{"style":113},[787],{"type":37,"value":788},"  method: ",{"type":32,"tag":95,"props":790,"children":791},{"style":226},[792],{"type":37,"value":793},"'POST'",{"type":32,"tag":95,"props":795,"children":796},{"style":113},[797],{"type":37,"value":798},",\n",{"type":32,"tag":95,"props":800,"children":801},{"class":97,"line":195},[802,807,812,816,821,826,831],{"type":32,"tag":95,"props":803,"children":804},{"style":113},[805],{"type":37,"value":806},"  headers: { ",{"type":32,"tag":95,"props":808,"children":809},{"style":226},[810],{"type":37,"value":811},"'Authorization'",{"type":32,"tag":95,"props":813,"children":814},{"style":113},[815],{"type":37,"value":498},{"type":32,"tag":95,"props":817,"children":818},{"style":226},[819],{"type":37,"value":820},"`Bearer ${",{"type":32,"tag":95,"props":822,"children":823},{"style":113},[824],{"type":37,"value":825},"apiToken",{"type":32,"tag":95,"props":827,"children":828},{"style":226},[829],{"type":37,"value":830},"}`",{"type":32,"tag":95,"props":832,"children":833},{"style":113},[834],{"type":37,"value":835}," },\n",{"type":32,"tag":95,"props":837,"children":838},{"class":97,"line":252},[839,844,849,853,858,863,868,873,877],{"type":32,"tag":95,"props":840,"children":841},{"style":113},[842],{"type":37,"value":843},"  body: ",{"type":32,"tag":95,"props":845,"children":846},{"style":169},[847],{"type":37,"value":848},"JSON",{"type":32,"tag":95,"props":850,"children":851},{"style":113},[852],{"type":37,"value":305},{"type":32,"tag":95,"props":854,"children":855},{"style":128},[856],{"type":37,"value":857},"stringify",{"type":32,"tag":95,"props":859,"children":860},{"style":113},[861],{"type":37,"value":862},"({ files: [",{"type":32,"tag":95,"props":864,"children":865},{"style":226},[866],{"type":37,"value":867},"`https:\u002F\u002Fexample.com\u002Fuser\u002F${",{"type":32,"tag":95,"props":869,"children":870},{"style":113},[871],{"type":37,"value":872},"userId",{"type":32,"tag":95,"props":874,"children":875},{"style":226},[876],{"type":37,"value":830},{"type":32,"tag":95,"props":878,"children":879},{"style":113},[880],{"type":37,"value":881},"] })\n",{"type":32,"tag":95,"props":883,"children":884},{"class":97,"line":261},[885],{"type":32,"tag":95,"props":886,"children":887},{"style":113},[888],{"type":37,"value":889},"});\n",{"type":32,"tag":690,"props":891,"children":892},{"start":252},[893,898],{"type":32,"tag":694,"props":894,"children":895},{},[896],{"type":37,"value":897},"Edge function bir sonraki request'te KV'den yeni değeri okur",{"type":32,"tag":694,"props":899,"children":900},{},[901],{"type":37,"value":902},"Client-side JavaScript 200ms sonra soft reload yapar",{"type":32,"tag":33,"props":904,"children":905},{},[906],{"type":37,"value":907},"Bu pattern write throughput'u sınırlar (KV write rate limit: 1000\u002Fsaniye per account) ama read throughput sınırsız. Dolayısıyla mimari read-heavy workload'lara optimize. User action'ları nadir (dakikada 1-2), sayfa görüntüleme sık (saniyede 100+).",{"type":32,"tag":542,"props":909,"children":911},{"id":910},"cache-layering-stratejisi",[912],{"type":37,"value":913},"Cache layering stratejisi",{"type":32,"tag":33,"props":915,"children":916},{},[917],{"type":37,"value":918},"KV tek cache layer değil. Full stack:",{"type":32,"tag":84,"props":920,"children":922},{"code":921},"Browser Cache (service worker)\n  ↓\nCDN Edge Cache (Cache API, 60s TTL)\n  ↓\nEdge KV (eventual, minutes)\n  ↓\nOrigin Database\n",[923],{"type":32,"tag":91,"props":924,"children":925},{"__ignoreMap":16},[926],{"type":37,"value":921},{"type":32,"tag":33,"props":928,"children":929},{},[930],{"type":37,"value":931},"Static asset (CSS, JS) en üstte, user-specific data en altta. HTML'in kendisi middle layer'da: edge function KV + Cache API'yi combine ederek render ediyor. Pseudocode:",{"type":32,"tag":84,"props":933,"children":935},{"code":934,"language":87,"meta":16,"className":88,"style":16},"const cacheKey = `html:${url}:${segment}`;\nlet html = await caches.default.match(cacheKey);\n\nif (!html) {\n  const userData = await KV.get(userId);\n  html = renderTemplate(userData);\n  await caches.default.put(cacheKey, html, { expirationTtl: 60 });\n}\n\nreturn html;\n",[936],{"type":32,"tag":91,"props":937,"children":938},{"__ignoreMap":16},[939,984,1021,1030,1053,1091,1113,1145,1153,1160],{"type":32,"tag":95,"props":940,"children":941},{"class":97,"line":98},[942,947,952,956,961,966,971,976,980],{"type":32,"tag":95,"props":943,"children":944},{"style":102},[945],{"type":37,"value":946},"const",{"type":32,"tag":95,"props":948,"children":949},{"style":169},[950],{"type":37,"value":951}," cacheKey",{"type":32,"tag":95,"props":953,"children":954},{"style":102},[955],{"type":37,"value":177},{"type":32,"tag":95,"props":957,"children":958},{"style":226},[959],{"type":37,"value":960}," `html:${",{"type":32,"tag":95,"props":962,"children":963},{"style":113},[964],{"type":37,"value":965},"url",{"type":32,"tag":95,"props":967,"children":968},{"style":226},[969],{"type":37,"value":970},"}:${",{"type":32,"tag":95,"props":972,"children":973},{"style":113},[974],{"type":37,"value":975},"segment",{"type":32,"tag":95,"props":977,"children":978},{"style":226},[979],{"type":37,"value":830},{"type":32,"tag":95,"props":981,"children":982},{"style":113},[983],{"type":37,"value":249},{"type":32,"tag":95,"props":985,"children":986},{"class":97,"line":119},[987,992,997,1002,1006,1011,1016],{"type":32,"tag":95,"props":988,"children":989},{"style":102},[990],{"type":37,"value":991},"let",{"type":32,"tag":95,"props":993,"children":994},{"style":113},[995],{"type":37,"value":996}," html ",{"type":32,"tag":95,"props":998,"children":999},{"style":102},[1000],{"type":37,"value":1001},"=",{"type":32,"tag":95,"props":1003,"children":1004},{"style":102},[1005],{"type":37,"value":290},{"type":32,"tag":95,"props":1007,"children":1008},{"style":113},[1009],{"type":37,"value":1010}," caches.default.",{"type":32,"tag":95,"props":1012,"children":1013},{"style":128},[1014],{"type":37,"value":1015},"match",{"type":32,"tag":95,"props":1017,"children":1018},{"style":113},[1019],{"type":37,"value":1020},"(cacheKey);\n",{"type":32,"tag":95,"props":1022,"children":1023},{"class":97,"line":160},[1024],{"type":32,"tag":95,"props":1025,"children":1027},{"emptyLinePlaceholder":1026},true,[1028],{"type":37,"value":1029},"\n",{"type":32,"tag":95,"props":1031,"children":1032},{"class":97,"line":195},[1033,1038,1043,1048],{"type":32,"tag":95,"props":1034,"children":1035},{"style":102},[1036],{"type":37,"value":1037},"if",{"type":32,"tag":95,"props":1039,"children":1040},{"style":113},[1041],{"type":37,"value":1042}," (",{"type":32,"tag":95,"props":1044,"children":1045},{"style":102},[1046],{"type":37,"value":1047},"!",{"type":32,"tag":95,"props":1049,"children":1050},{"style":113},[1051],{"type":37,"value":1052},"html) {\n",{"type":32,"tag":95,"props":1054,"children":1055},{"class":97,"line":252},[1056,1061,1066,1070,1074,1079,1083,1087],{"type":32,"tag":95,"props":1057,"children":1058},{"style":102},[1059],{"type":37,"value":1060},"  const",{"type":32,"tag":95,"props":1062,"children":1063},{"style":169},[1064],{"type":37,"value":1065}," userData",{"type":32,"tag":95,"props":1067,"children":1068},{"style":102},[1069],{"type":37,"value":177},{"type":32,"tag":95,"props":1071,"children":1072},{"style":102},[1073],{"type":37,"value":290},{"type":32,"tag":95,"props":1075,"children":1076},{"style":169},[1077],{"type":37,"value":1078}," KV",{"type":32,"tag":95,"props":1080,"children":1081},{"style":113},[1082],{"type":37,"value":305},{"type":32,"tag":95,"props":1084,"children":1085},{"style":128},[1086],{"type":37,"value":219},{"type":32,"tag":95,"props":1088,"children":1089},{"style":113},[1090],{"type":37,"value":314},{"type":32,"tag":95,"props":1092,"children":1093},{"class":97,"line":261},[1094,1099,1103,1108],{"type":32,"tag":95,"props":1095,"children":1096},{"style":113},[1097],{"type":37,"value":1098},"  html ",{"type":32,"tag":95,"props":1100,"children":1101},{"style":102},[1102],{"type":37,"value":1001},{"type":32,"tag":95,"props":1104,"children":1105},{"style":128},[1106],{"type":37,"value":1107}," renderTemplate",{"type":32,"tag":95,"props":1109,"children":1110},{"style":113},[1111],{"type":37,"value":1112},"(userData);\n",{"type":32,"tag":95,"props":1114,"children":1115},{"class":97,"line":271},[1116,1121,1125,1130,1135,1140],{"type":32,"tag":95,"props":1117,"children":1118},{"style":102},[1119],{"type":37,"value":1120},"  await",{"type":32,"tag":95,"props":1122,"children":1123},{"style":113},[1124],{"type":37,"value":1010},{"type":32,"tag":95,"props":1126,"children":1127},{"style":128},[1128],{"type":37,"value":1129},"put",{"type":32,"tag":95,"props":1131,"children":1132},{"style":113},[1133],{"type":37,"value":1134},"(cacheKey, html, { expirationTtl: ",{"type":32,"tag":95,"props":1136,"children":1137},{"style":169},[1138],{"type":37,"value":1139},"60",{"type":32,"tag":95,"props":1141,"children":1142},{"style":113},[1143],{"type":37,"value":1144}," });\n",{"type":32,"tag":95,"props":1146,"children":1147},{"class":97,"line":26},[1148],{"type":32,"tag":95,"props":1149,"children":1150},{"style":113},[1151],{"type":37,"value":1152},"}\n",{"type":32,"tag":95,"props":1154,"children":1155},{"class":97,"line":324},[1156],{"type":32,"tag":95,"props":1157,"children":1158},{"emptyLinePlaceholder":1026},[1159],{"type":37,"value":1029},{"type":32,"tag":95,"props":1161,"children":1162},{"class":97,"line":333},[1163,1168],{"type":32,"tag":95,"props":1164,"children":1165},{"style":102},[1166],{"type":37,"value":1167},"return",{"type":32,"tag":95,"props":1169,"children":1170},{"style":113},[1171],{"type":37,"value":1172}," html;\n",{"type":32,"tag":33,"props":1174,"children":1175},{},[1176],{"type":37,"value":1177},"Bu yapı 95th percentile TTFB'yi 40ms altında tutuyor çünkü çoğu request Cache API'den servis ediliyor (5-8ms). KV hit oranı %98+, origin fallback %2 altı.",{"type":32,"tag":40,"props":1179,"children":1181},{"id":1180},"personalization-scope-ve-bundle-size-tradeoffu",[1182],{"type":37,"value":1183},"Personalization scope ve bundle size tradeoff'u",{"type":32,"tag":33,"props":1185,"children":1186},{},[1187],{"type":37,"value":1188},"Edge function 1MB bundle size limitine sahip (Cloudflare). Heavy React component render edemezsin. İki strateji:",{"type":32,"tag":33,"props":1190,"children":1191},{},[1192,1198],{"type":32,"tag":1193,"props":1194,"children":1195},"strong",{},[1196],{"type":37,"value":1197},"1. Minimal templating:",{"type":37,"value":1199}," Handlebars veya custom string interpolation kullan. Sadece değişken inject et:",{"type":32,"tag":84,"props":1201,"children":1203},{"code":1202,"language":87,"meta":16,"className":88,"style":16},"const template = `\u003Cdiv class=\"product-card\">\n  \u003Ch3>{{name}}\u003C\u002Fh3>\n  \u003Cspan class=\"price {{priceClass}}\">{{price}}\u003C\u002Fspan>\n\u003C\u002Fdiv>`;\n\nfunction render(product, segment) {\n  return template\n    .replace('{{name}}', product.name)\n    .replace('{{price}}', segment === 'premium' ? product.premiumPrice : product.price)\n    .replace('{{priceClass}}', segment === 'premium' ? 'gold' : 'standard');\n}\n",[1204],{"type":32,"tag":91,"props":1205,"children":1206},{"__ignoreMap":16},[1207,1228,1236,1244,1256,1263,1297,1310,1337,1390,1446],{"type":32,"tag":95,"props":1208,"children":1209},{"class":97,"line":98},[1210,1214,1219,1223],{"type":32,"tag":95,"props":1211,"children":1212},{"style":102},[1213],{"type":37,"value":946},{"type":32,"tag":95,"props":1215,"children":1216},{"style":169},[1217],{"type":37,"value":1218}," template",{"type":32,"tag":95,"props":1220,"children":1221},{"style":102},[1222],{"type":37,"value":177},{"type":32,"tag":95,"props":1224,"children":1225},{"style":226},[1226],{"type":37,"value":1227}," `\u003Cdiv class=\"product-card\">\n",{"type":32,"tag":95,"props":1229,"children":1230},{"class":97,"line":119},[1231],{"type":32,"tag":95,"props":1232,"children":1233},{"style":226},[1234],{"type":37,"value":1235},"  \u003Ch3>{{name}}\u003C\u002Fh3>\n",{"type":32,"tag":95,"props":1237,"children":1238},{"class":97,"line":160},[1239],{"type":32,"tag":95,"props":1240,"children":1241},{"style":226},[1242],{"type":37,"value":1243},"  \u003Cspan class=\"price {{priceClass}}\">{{price}}\u003C\u002Fspan>\n",{"type":32,"tag":95,"props":1245,"children":1246},{"class":97,"line":195},[1247,1252],{"type":32,"tag":95,"props":1248,"children":1249},{"style":226},[1250],{"type":37,"value":1251},"\u003C\u002Fdiv>`",{"type":32,"tag":95,"props":1253,"children":1254},{"style":113},[1255],{"type":37,"value":249},{"type":32,"tag":95,"props":1257,"children":1258},{"class":97,"line":252},[1259],{"type":32,"tag":95,"props":1260,"children":1261},{"emptyLinePlaceholder":1026},[1262],{"type":37,"value":1029},{"type":32,"tag":95,"props":1264,"children":1265},{"class":97,"line":261},[1266,1271,1276,1280,1285,1289,1293],{"type":32,"tag":95,"props":1267,"children":1268},{"style":102},[1269],{"type":37,"value":1270},"function",{"type":32,"tag":95,"props":1272,"children":1273},{"style":128},[1274],{"type":37,"value":1275}," render",{"type":32,"tag":95,"props":1277,"children":1278},{"style":113},[1279],{"type":37,"value":136},{"type":32,"tag":95,"props":1281,"children":1282},{"style":139},[1283],{"type":37,"value":1284},"product",{"type":32,"tag":95,"props":1286,"children":1287},{"style":113},[1288],{"type":37,"value":147},{"type":32,"tag":95,"props":1290,"children":1291},{"style":139},[1292],{"type":37,"value":975},{"type":32,"tag":95,"props":1294,"children":1295},{"style":113},[1296],{"type":37,"value":157},{"type":32,"tag":95,"props":1298,"children":1299},{"class":97,"line":271},[1300,1305],{"type":32,"tag":95,"props":1301,"children":1302},{"style":102},[1303],{"type":37,"value":1304},"  return",{"type":32,"tag":95,"props":1306,"children":1307},{"style":113},[1308],{"type":37,"value":1309}," template\n",{"type":32,"tag":95,"props":1311,"children":1312},{"class":97,"line":26},[1313,1318,1323,1327,1332],{"type":32,"tag":95,"props":1314,"children":1315},{"style":113},[1316],{"type":37,"value":1317},"    .",{"type":32,"tag":95,"props":1319,"children":1320},{"style":128},[1321],{"type":37,"value":1322},"replace",{"type":32,"tag":95,"props":1324,"children":1325},{"style":113},[1326],{"type":37,"value":136},{"type":32,"tag":95,"props":1328,"children":1329},{"style":226},[1330],{"type":37,"value":1331},"'{{name}}'",{"type":32,"tag":95,"props":1333,"children":1334},{"style":113},[1335],{"type":37,"value":1336},", product.name)\n",{"type":32,"tag":95,"props":1338,"children":1339},{"class":97,"line":324},[1340,1344,1348,1352,1357,1362,1366,1370,1375,1380,1385],{"type":32,"tag":95,"props":1341,"children":1342},{"style":113},[1343],{"type":37,"value":1317},{"type":32,"tag":95,"props":1345,"children":1346},{"style":128},[1347],{"type":37,"value":1322},{"type":32,"tag":95,"props":1349,"children":1350},{"style":113},[1351],{"type":37,"value":136},{"type":32,"tag":95,"props":1353,"children":1354},{"style":226},[1355],{"type":37,"value":1356},"'{{price}}'",{"type":32,"tag":95,"props":1358,"children":1359},{"style":113},[1360],{"type":37,"value":1361},", segment ",{"type":32,"tag":95,"props":1363,"children":1364},{"style":102},[1365],{"type":37,"value":357},{"type":32,"tag":95,"props":1367,"children":1368},{"style":226},[1369],{"type":37,"value":362},{"type":32,"tag":95,"props":1371,"children":1372},{"style":102},[1373],{"type":37,"value":1374}," ?",{"type":32,"tag":95,"props":1376,"children":1377},{"style":113},[1378],{"type":37,"value":1379}," product.premiumPrice ",{"type":32,"tag":95,"props":1381,"children":1382},{"style":102},[1383],{"type":37,"value":1384},":",{"type":32,"tag":95,"props":1386,"children":1387},{"style":113},[1388],{"type":37,"value":1389}," product.price)\n",{"type":32,"tag":95,"props":1391,"children":1392},{"class":97,"line":333},[1393,1397,1401,1405,1410,1414,1418,1422,1426,1431,1436,1441],{"type":32,"tag":95,"props":1394,"children":1395},{"style":113},[1396],{"type":37,"value":1317},{"type":32,"tag":95,"props":1398,"children":1399},{"style":128},[1400],{"type":37,"value":1322},{"type":32,"tag":95,"props":1402,"children":1403},{"style":113},[1404],{"type":37,"value":136},{"type":32,"tag":95,"props":1406,"children":1407},{"style":226},[1408],{"type":37,"value":1409},"'{{priceClass}}'",{"type":32,"tag":95,"props":1411,"children":1412},{"style":113},[1413],{"type":37,"value":1361},{"type":32,"tag":95,"props":1415,"children":1416},{"style":102},[1417],{"type":37,"value":357},{"type":32,"tag":95,"props":1419,"children":1420},{"style":226},[1421],{"type":37,"value":362},{"type":32,"tag":95,"props":1423,"children":1424},{"style":102},[1425],{"type":37,"value":1374},{"type":32,"tag":95,"props":1427,"children":1428},{"style":226},[1429],{"type":37,"value":1430}," 'gold'",{"type":32,"tag":95,"props":1432,"children":1433},{"style":102},[1434],{"type":37,"value":1435}," :",{"type":32,"tag":95,"props":1437,"children":1438},{"style":226},[1439],{"type":37,"value":1440}," 'standard'",{"type":32,"tag":95,"props":1442,"children":1443},{"style":113},[1444],{"type":37,"value":1445},");\n",{"type":32,"tag":95,"props":1447,"children":1448},{"class":97,"line":370},[1449],{"type":32,"tag":95,"props":1450,"children":1451},{"style":113},[1452],{"type":37,"value":1152},{"type":32,"tag":33,"props":1454,"children":1455},{},[1456],{"type":37,"value":1457},"Bundle size: 2KB. Render time: 0.3ms.",{"type":32,"tag":33,"props":1459,"children":1460},{},[1461,1466],{"type":32,"tag":1193,"props":1462,"children":1463},{},[1464],{"type":37,"value":1465},"2. Partial hydration:",{"type":37,"value":1467}," Edge'de skeleton HTML render et, client-side React island'ları hydrate et. Edge function:",{"type":32,"tag":84,"props":1469,"children":1471},{"code":1470,"language":87,"meta":16,"className":88,"style":16},"export default async function(request) {\n  const products = await fetchProducts();\n  return `\n    \u003Cdiv id=\"product-list\" data-products='${JSON.stringify(products)}'>\n      ${products.map(p => `\u003Cdiv class=\"skeleton\">\u003C\u002Fdiv>`).join('')}\n    \u003C\u002Fdiv>\n    \u003Cscript type=\"module\" src=\"\u002Fhydrate.js\">\u003C\u002Fscript>\n  `;\n}\n",[1472],{"type":32,"tag":91,"props":1473,"children":1474},{"__ignoreMap":16},[1475,1508,1536,1548,1587,1653,1661,1669,1681],{"type":32,"tag":95,"props":1476,"children":1477},{"class":97,"line":98},[1478,1482,1486,1491,1496,1500,1504],{"type":32,"tag":95,"props":1479,"children":1480},{"style":102},[1481],{"type":37,"value":105},{"type":32,"tag":95,"props":1483,"children":1484},{"style":102},[1485],{"type":37,"value":110},{"type":32,"tag":95,"props":1487,"children":1488},{"style":102},[1489],{"type":37,"value":1490}," async",{"type":32,"tag":95,"props":1492,"children":1493},{"style":102},[1494],{"type":37,"value":1495}," function",{"type":32,"tag":95,"props":1497,"children":1498},{"style":113},[1499],{"type":37,"value":136},{"type":32,"tag":95,"props":1501,"children":1502},{"style":139},[1503],{"type":37,"value":142},{"type":32,"tag":95,"props":1505,"children":1506},{"style":113},[1507],{"type":37,"value":157},{"type":32,"tag":95,"props":1509,"children":1510},{"class":97,"line":119},[1511,1515,1519,1523,1527,1532],{"type":32,"tag":95,"props":1512,"children":1513},{"style":102},[1514],{"type":37,"value":1060},{"type":32,"tag":95,"props":1516,"children":1517},{"style":169},[1518],{"type":37,"value":343},{"type":32,"tag":95,"props":1520,"children":1521},{"style":102},[1522],{"type":37,"value":177},{"type":32,"tag":95,"props":1524,"children":1525},{"style":102},[1526],{"type":37,"value":290},{"type":32,"tag":95,"props":1528,"children":1529},{"style":128},[1530],{"type":37,"value":1531}," fetchProducts",{"type":32,"tag":95,"props":1533,"children":1534},{"style":113},[1535],{"type":37,"value":413},{"type":32,"tag":95,"props":1537,"children":1538},{"class":97,"line":160},[1539,1543],{"type":32,"tag":95,"props":1540,"children":1541},{"style":102},[1542],{"type":37,"value":1304},{"type":32,"tag":95,"props":1544,"children":1545},{"style":226},[1546],{"type":37,"value":1547}," `\n",{"type":32,"tag":95,"props":1549,"children":1550},{"class":97,"line":195},[1551,1556,1560,1564,1568,1572,1577,1582],{"type":32,"tag":95,"props":1552,"children":1553},{"style":226},[1554],{"type":37,"value":1555},"    \u003Cdiv id=\"product-list\" data-products='${",{"type":32,"tag":95,"props":1557,"children":1558},{"style":169},[1559],{"type":37,"value":848},{"type":32,"tag":95,"props":1561,"children":1562},{"style":226},[1563],{"type":37,"value":305},{"type":32,"tag":95,"props":1565,"children":1566},{"style":128},[1567],{"type":37,"value":857},{"type":32,"tag":95,"props":1569,"children":1570},{"style":226},[1571],{"type":37,"value":136},{"type":32,"tag":95,"props":1573,"children":1574},{"style":113},[1575],{"type":37,"value":1576},"products",{"type":32,"tag":95,"props":1578,"children":1579},{"style":226},[1580],{"type":37,"value":1581},")",{"type":32,"tag":95,"props":1583,"children":1584},{"style":226},[1585],{"type":37,"value":1586},"}'>\n",{"type":32,"tag":95,"props":1588,"children":1589},{"class":97,"line":252},[1590,1595,1599,1603,1608,1612,1616,1621,1626,1631,1636,1640,1645,1649],{"type":32,"tag":95,"props":1591,"children":1592},{"style":226},[1593],{"type":37,"value":1594},"      ${",{"type":32,"tag":95,"props":1596,"children":1597},{"style":113},[1598],{"type":37,"value":1576},{"type":32,"tag":95,"props":1600,"children":1601},{"style":226},[1602],{"type":37,"value":305},{"type":32,"tag":95,"props":1604,"children":1605},{"style":128},[1606],{"type":37,"value":1607},"map",{"type":32,"tag":95,"props":1609,"children":1610},{"style":226},[1611],{"type":37,"value":136},{"type":32,"tag":95,"props":1613,"children":1614},{"style":169},[1615],{"type":37,"value":33},{"type":32,"tag":95,"props":1617,"children":1618},{"style":102},[1619],{"type":37,"value":1620}," =>",{"type":32,"tag":95,"props":1622,"children":1623},{"style":226},[1624],{"type":37,"value":1625}," `\u003Cdiv class=\"skeleton\">\u003C\u002Fdiv>`",{"type":32,"tag":95,"props":1627,"children":1628},{"style":226},[1629],{"type":37,"value":1630},").",{"type":32,"tag":95,"props":1632,"children":1633},{"style":128},[1634],{"type":37,"value":1635},"join",{"type":32,"tag":95,"props":1637,"children":1638},{"style":226},[1639],{"type":37,"value":136},{"type":32,"tag":95,"props":1641,"children":1642},{"style":226},[1643],{"type":37,"value":1644},"''",{"type":32,"tag":95,"props":1646,"children":1647},{"style":226},[1648],{"type":37,"value":1581},{"type":32,"tag":95,"props":1650,"children":1651},{"style":226},[1652],{"type":37,"value":1152},{"type":32,"tag":95,"props":1654,"children":1655},{"class":97,"line":261},[1656],{"type":32,"tag":95,"props":1657,"children":1658},{"style":226},[1659],{"type":37,"value":1660},"    \u003C\u002Fdiv>\n",{"type":32,"tag":95,"props":1662,"children":1663},{"class":97,"line":271},[1664],{"type":32,"tag":95,"props":1665,"children":1666},{"style":226},[1667],{"type":37,"value":1668},"    \u003Cscript type=\"module\" src=\"\u002Fhydrate.js\">\u003C\u002Fscript>\n",{"type":32,"tag":95,"props":1670,"children":1671},{"class":97,"line":26},[1672,1677],{"type":32,"tag":95,"props":1673,"children":1674},{"style":226},[1675],{"type":37,"value":1676},"  `",{"type":32,"tag":95,"props":1678,"children":1679},{"style":113},[1680],{"type":37,"value":249},{"type":32,"tag":95,"props":1682,"children":1683},{"class":97,"line":324},[1684],{"type":32,"tag":95,"props":1685,"children":1686},{"style":113},[1687],{"type":37,"value":1152},{"type":32,"tag":33,"props":1689,"children":1690},{},[1691,1693,1699],{"type":37,"value":1692},"Client-side ",{"type":32,"tag":91,"props":1694,"children":1696},{"className":1695},[],[1697],{"type":37,"value":1698},"hydrate.js",{"type":37,"value":1700}," (10KB):",{"type":32,"tag":84,"props":1702,"children":1704},{"code":1703,"language":87,"meta":16,"className":88,"style":16},"import { h, render } from 'preact';\nconst data = JSON.parse(document.getElementById('product-list').dataset.products);\nrender(\u003CProductList products={data} \u002F>, document.getElementById('product-list'));\n",[1705],{"type":32,"tag":91,"props":1706,"children":1707},{"__ignoreMap":16},[1708,1735,1789],{"type":32,"tag":95,"props":1709,"children":1710},{"class":97,"line":98},[1711,1716,1721,1726,1731],{"type":32,"tag":95,"props":1712,"children":1713},{"style":102},[1714],{"type":37,"value":1715},"import",{"type":32,"tag":95,"props":1717,"children":1718},{"style":113},[1719],{"type":37,"value":1720}," { h, render } ",{"type":32,"tag":95,"props":1722,"children":1723},{"style":102},[1724],{"type":37,"value":1725},"from",{"type":32,"tag":95,"props":1727,"children":1728},{"style":226},[1729],{"type":37,"value":1730}," 'preact'",{"type":32,"tag":95,"props":1732,"children":1733},{"style":113},[1734],{"type":37,"value":249},{"type":32,"tag":95,"props":1736,"children":1737},{"class":97,"line":119},[1738,1742,1747,1751,1756,1760,1765,1770,1775,1779,1784],{"type":32,"tag":95,"props":1739,"children":1740},{"style":102},[1741],{"type":37,"value":946},{"type":32,"tag":95,"props":1743,"children":1744},{"style":169},[1745],{"type":37,"value":1746}," data",{"type":32,"tag":95,"props":1748,"children":1749},{"style":102},[1750],{"type":37,"value":177},{"type":32,"tag":95,"props":1752,"children":1753},{"style":169},[1754],{"type":37,"value":1755}," JSON",{"type":32,"tag":95,"props":1757,"children":1758},{"style":113},[1759],{"type":37,"value":305},{"type":32,"tag":95,"props":1761,"children":1762},{"style":128},[1763],{"type":37,"value":1764},"parse",{"type":32,"tag":95,"props":1766,"children":1767},{"style":113},[1768],{"type":37,"value":1769},"(document.",{"type":32,"tag":95,"props":1771,"children":1772},{"style":128},[1773],{"type":37,"value":1774},"getElementById",{"type":32,"tag":95,"props":1776,"children":1777},{"style":113},[1778],{"type":37,"value":136},{"type":32,"tag":95,"props":1780,"children":1781},{"style":226},[1782],{"type":37,"value":1783},"'product-list'",{"type":32,"tag":95,"props":1785,"children":1786},{"style":113},[1787],{"type":37,"value":1788},").dataset.products);\n",{"type":32,"tag":95,"props":1790,"children":1791},{"class":97,"line":160},[1792,1797,1802,1807,1811,1815,1820,1824,1828,1832],{"type":32,"tag":95,"props":1793,"children":1794},{"style":128},[1795],{"type":37,"value":1796},"render",{"type":32,"tag":95,"props":1798,"children":1799},{"style":113},[1800],{"type":37,"value":1801},"(\u003C",{"type":32,"tag":95,"props":1803,"children":1804},{"style":169},[1805],{"type":37,"value":1806},"ProductList",{"type":32,"tag":95,"props":1808,"children":1809},{"style":128},[1810],{"type":37,"value":343},{"type":32,"tag":95,"props":1812,"children":1813},{"style":102},[1814],{"type":37,"value":1001},{"type":32,"tag":95,"props":1816,"children":1817},{"style":113},[1818],{"type":37,"value":1819},"{data} \u002F>, document.",{"type":32,"tag":95,"props":1821,"children":1822},{"style":128},[1823],{"type":37,"value":1774},{"type":32,"tag":95,"props":1825,"children":1826},{"style":113},[1827],{"type":37,"value":136},{"type":32,"tag":95,"props":1829,"children":1830},{"style":226},[1831],{"type":37,"value":1783},{"type":32,"tag":95,"props":1833,"children":1834},{"style":113},[1835],{"type":37,"value":1836},"));\n",{"type":32,"tag":33,"props":1838,"children":1839},{},[1840],{"type":37,"value":1841},"Bu pattern ile edge SSR latency düşük kalır (40ms), interaktivite client-side gelir (FCP + 150ms). Tradeoff: INP artabilir (JavaScript parse time). Monitoring gerekiyor.",{"type":32,"tag":40,"props":1843,"children":1845},{"id":1844},"real-user-monitoring-ve-alerting",[1846],{"type":37,"value":1847},"Real user monitoring ve alerting",{"type":32,"tag":33,"props":1849,"children":1850},{},[1851],{"type":37,"value":1852},"Edge latency'i RUM olmadan optimize edemezsin. Cloudflare Analytics her request için server-timing header ekler:",{"type":32,"tag":84,"props":1854,"children":1856},{"code":1855},"Server-Timing: cf-edge;dur=12, cf-kv;dur=8, cf-render;dur=18\n",[1857],{"type":32,"tag":91,"props":1858,"children":1859},{"__ignoreMap":16},[1860],{"type":37,"value":1855},{"type":32,"tag":33,"props":1862,"children":1863},{},[1864],{"type":37,"value":1865},"Bunu client-side PerformanceObserver ile topla:",{"type":32,"tag":84,"props":1867,"children":1869},{"code":1868,"language":87,"meta":16,"className":88,"style":16},"new PerformanceObserver((list) => {\n  for (const entry of list.getEntries()) {\n    if (entry.entryType === 'navigation') {\n      const ttfb = entry.responseStart - entry.requestStart;\n      fetch('\u002Fanalytics', { \n        method: 'POST', \n        body: JSON.stringify({ ttfb, url: entry.name }) \n      });\n    }\n  }\n}).observe({ entryTypes: ['navigation'] });\n",[1870],{"type":32,"tag":91,"props":1871,"children":1872},{"__ignoreMap":16},[1873,1909,1950,1976,2008,2030,2047,2072,2080,2088,2095],{"type":32,"tag":95,"props":1874,"children":1875},{"class":97,"line":98},[1876,1881,1886,1891,1896,1900,1905],{"type":32,"tag":95,"props":1877,"children":1878},{"style":102},[1879],{"type":37,"value":1880},"new",{"type":32,"tag":95,"props":1882,"children":1883},{"style":128},[1884],{"type":37,"value":1885}," PerformanceObserver",{"type":32,"tag":95,"props":1887,"children":1888},{"style":113},[1889],{"type":37,"value":1890},"((",{"type":32,"tag":95,"props":1892,"children":1893},{"style":139},[1894],{"type":37,"value":1895},"list",{"type":32,"tag":95,"props":1897,"children":1898},{"style":113},[1899],{"type":37,"value":234},{"type":32,"tag":95,"props":1901,"children":1902},{"style":102},[1903],{"type":37,"value":1904},"=>",{"type":32,"tag":95,"props":1906,"children":1907},{"style":113},[1908],{"type":37,"value":116},{"type":32,"tag":95,"props":1910,"children":1911},{"class":97,"line":119},[1912,1917,1921,1925,1930,1935,1940,1945],{"type":32,"tag":95,"props":1913,"children":1914},{"style":102},[1915],{"type":37,"value":1916},"  for",{"type":32,"tag":95,"props":1918,"children":1919},{"style":113},[1920],{"type":37,"value":1042},{"type":32,"tag":95,"props":1922,"children":1923},{"style":102},[1924],{"type":37,"value":946},{"type":32,"tag":95,"props":1926,"children":1927},{"style":169},[1928],{"type":37,"value":1929}," entry",{"type":32,"tag":95,"props":1931,"children":1932},{"style":102},[1933],{"type":37,"value":1934}," of",{"type":32,"tag":95,"props":1936,"children":1937},{"style":113},[1938],{"type":37,"value":1939}," list.",{"type":32,"tag":95,"props":1941,"children":1942},{"style":128},[1943],{"type":37,"value":1944},"getEntries",{"type":32,"tag":95,"props":1946,"children":1947},{"style":113},[1948],{"type":37,"value":1949},"()) {\n",{"type":32,"tag":95,"props":1951,"children":1952},{"class":97,"line":160},[1953,1958,1963,1967,1972],{"type":32,"tag":95,"props":1954,"children":1955},{"style":102},[1956],{"type":37,"value":1957},"    if",{"type":32,"tag":95,"props":1959,"children":1960},{"style":113},[1961],{"type":37,"value":1962}," (entry.entryType ",{"type":32,"tag":95,"props":1964,"children":1965},{"style":102},[1966],{"type":37,"value":357},{"type":32,"tag":95,"props":1968,"children":1969},{"style":226},[1970],{"type":37,"value":1971}," 'navigation'",{"type":32,"tag":95,"props":1973,"children":1974},{"style":113},[1975],{"type":37,"value":157},{"type":32,"tag":95,"props":1977,"children":1978},{"class":97,"line":195},[1979,1984,1989,1993,1998,2003],{"type":32,"tag":95,"props":1980,"children":1981},{"style":102},[1982],{"type":37,"value":1983},"      const",{"type":32,"tag":95,"props":1985,"children":1986},{"style":169},[1987],{"type":37,"value":1988}," ttfb",{"type":32,"tag":95,"props":1990,"children":1991},{"style":102},[1992],{"type":37,"value":177},{"type":32,"tag":95,"props":1994,"children":1995},{"style":113},[1996],{"type":37,"value":1997}," entry.responseStart ",{"type":32,"tag":95,"props":1999,"children":2000},{"style":102},[2001],{"type":37,"value":2002},"-",{"type":32,"tag":95,"props":2004,"children":2005},{"style":113},[2006],{"type":37,"value":2007}," entry.requestStart;\n",{"type":32,"tag":95,"props":2009,"children":2010},{"class":97,"line":252},[2011,2016,2020,2025],{"type":32,"tag":95,"props":2012,"children":2013},{"style":128},[2014],{"type":37,"value":2015},"      fetch",{"type":32,"tag":95,"props":2017,"children":2018},{"style":113},[2019],{"type":37,"value":136},{"type":32,"tag":95,"props":2021,"children":2022},{"style":226},[2023],{"type":37,"value":2024},"'\u002Fanalytics'",{"type":32,"tag":95,"props":2026,"children":2027},{"style":113},[2028],{"type":37,"value":2029},", { \n",{"type":32,"tag":95,"props":2031,"children":2032},{"class":97,"line":261},[2033,2038,2042],{"type":32,"tag":95,"props":2034,"children":2035},{"style":113},[2036],{"type":37,"value":2037},"        method: ",{"type":32,"tag":95,"props":2039,"children":2040},{"style":226},[2041],{"type":37,"value":793},{"type":32,"tag":95,"props":2043,"children":2044},{"style":113},[2045],{"type":37,"value":2046},", \n",{"type":32,"tag":95,"props":2048,"children":2049},{"class":97,"line":271},[2050,2055,2059,2063,2067],{"type":32,"tag":95,"props":2051,"children":2052},{"style":113},[2053],{"type":37,"value":2054},"        body: ",{"type":32,"tag":95,"props":2056,"children":2057},{"style":169},[2058],{"type":37,"value":848},{"type":32,"tag":95,"props":2060,"children":2061},{"style":113},[2062],{"type":37,"value":305},{"type":32,"tag":95,"props":2064,"children":2065},{"style":128},[2066],{"type":37,"value":857},{"type":32,"tag":95,"props":2068,"children":2069},{"style":113},[2070],{"type":37,"value":2071},"({ ttfb, url: entry.name }) \n",{"type":32,"tag":95,"props":2073,"children":2074},{"class":97,"line":26},[2075],{"type":32,"tag":95,"props":2076,"children":2077},{"style":113},[2078],{"type":37,"value":2079},"      });\n",{"type":32,"tag":95,"props":2081,"children":2082},{"class":97,"line":324},[2083],{"type":32,"tag":95,"props":2084,"children":2085},{"style":113},[2086],{"type":37,"value":2087},"    }\n",{"type":32,"tag":95,"props":2089,"children":2090},{"class":97,"line":333},[2091],{"type":32,"tag":95,"props":2092,"children":2093},{"style":113},[2094],{"type":37,"value":526},{"type":32,"tag":95,"props":2096,"children":2097},{"class":97,"line":370},[2098,2103,2108,2113,2118],{"type":32,"tag":95,"props":2099,"children":2100},{"style":113},[2101],{"type":37,"value":2102},"}).",{"type":32,"tag":95,"props":2104,"children":2105},{"style":128},[2106],{"type":37,"value":2107},"observe",{"type":32,"tag":95,"props":2109,"children":2110},{"style":113},[2111],{"type":37,"value":2112},"({ entryTypes: [",{"type":32,"tag":95,"props":2114,"children":2115},{"style":226},[2116],{"type":37,"value":2117},"'navigation'",{"type":32,"tag":95,"props":2119,"children":2120},{"style":113},[2121],{"type":37,"value":2122},"] });\n",{"type":32,"tag":33,"props":2124,"children":2125},{},[2126],{"type":37,"value":2127},"Target metrikler:",{"type":32,"tag":2129,"props":2130,"children":2131},"ul",{},[2132,2137,2142,2147],{"type":32,"tag":694,"props":2133,"children":2134},{},[2135],{"type":37,"value":2136},"p50 TTFB \u003C 30ms",{"type":32,"tag":694,"props":2138,"children":2139},{},[2140],{"type":37,"value":2141},"p95 TTFB \u003C 60ms",{"type":32,"tag":694,"props":2143,"children":2144},{},[2145],{"type":37,"value":2146},"p99 TTFB \u003C 100ms",{"type":32,"tag":694,"props":2148,"children":2149},{},[2150],{"type":37,"value":2151},"Edge error rate \u003C 0.1%",{"type":32,"tag":33,"props":2153,"children":2154},{},[2155],{"type":37,"value":2156},"60ms'yi aşan request'lerde Cloudflare trace ID'yi logla, Wrangler tail ile debug et. Çoğu zaman sebep KV timeout veya origin fallback.",{"type":32,"tag":40,"props":2158,"children":2160},{"id":2159},"production-deployment-checklist",[2161],{"type":37,"value":2162},"Production deployment checklist",{"type":32,"tag":33,"props":2164,"children":2165},{},[2166],{"type":37,"value":2167},"Edge SSR production'a almadan önce:",{"type":32,"tag":690,"props":2169,"children":2170},{},[2171,2181,2191,2201,2211],{"type":32,"tag":694,"props":2172,"children":2173},{},[2174,2179],{"type":32,"tag":1193,"props":2175,"children":2176},{},[2177],{"type":37,"value":2178},"Rate limiting:",{"type":37,"value":2180}," KV write'ı throttle et (user başına saniyede 1 write)",{"type":32,"tag":694,"props":2182,"children":2183},{},[2184,2189],{"type":32,"tag":1193,"props":2185,"children":2186},{},[2187],{"type":37,"value":2188},"Fallback chain:",{"type":37,"value":2190}," KV timeout olursa (>50ms) origin'e fallback, origin timeout olursa static HTML dön",{"type":32,"tag":694,"props":2192,"children":2193},{},[2194,2199],{"type":32,"tag":1193,"props":2195,"children":2196},{},[2197],{"type":37,"value":2198},"Feature flag:",{"type":37,"value":2200}," Edge personalization'ı kademeli aç (%10 → %50 → %100 traffic)",{"type":32,"tag":694,"props":2202,"children":2203},{},[2204,2209],{"type":32,"tag":1193,"props":2205,"children":2206},{},[2207],{"type":37,"value":2208},"Cost monitoring:",{"type":37,"value":2210}," Cloudflare Workers 100K request\u002Fgün free, sonrası $0.50\u002Fmillion. KV read sınırsız free, write $0.50\u002Fmillion.",{"type":32,"tag":694,"props":2212,"children":2213},{},[2214,2219],{"type":32,"tag":1193,"props":2215,"children":2216},{},[2217],{"type":37,"value":2218},"Security:",{"type":37,"value":2220}," User ID hash'le, KV key'de PII tutma, rate limit bypass için bot detection ekle",{"type":32,"tag":33,"props":2222,"children":2223},{},[2224],{"type":37,"value":2225},"Cost projeksiyonu: 1M günlük ziyaret, %30 personalize request = 300K edge invocation\u002Fgün = $0.15\u002Fgün = $4.50\u002Fay. Origin SSR alternatifi: 2 vCPU instance $50\u002Fay. Savings: %91.",{"type":32,"tag":33,"props":2227,"children":2228},{},[2229],{"type":37,"value":2230},"Edge SSR mimarisi bir kere kurulunca incremental cost sıfır. Yeni personalization rule eklemek sadece KV'ye yeni key yazmak demek. Yeni segment oluşturmak edge function'da bir if bloğu eklemek. Ölçeklenme doğrusal değil logaritmik — 10M request\u002Fgün aynı 40ms latency'de servis ediliyor. Bu nedenle büyüme stratejisinde edge-first düşünmek temel avantaj sağlıyor.",{"type":32,"tag":2232,"props":2233,"children":2234},"style",{},[2235],{"type":37,"value":2236},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":16,"searchDepth":160,"depth":160,"links":2238},[2239,2240,2243,2246,2247,2248],{"id":42,"depth":119,"text":45},{"id":74,"depth":119,"text":77,"children":2241},[2242],{"id":544,"depth":160,"text":547},{"id":675,"depth":119,"text":678,"children":2244},[2245],{"id":910,"depth":160,"text":913},{"id":1180,"depth":119,"text":1183},{"id":1844,"depth":119,"text":1847},{"id":2159,"depth":119,"text":2162},"markdown","content:tr:tech:edge-ssr-ile-personalizasyon-latencysini-40msye-dusurmek.md","content","tr\u002Ftech\u002Fedge-ssr-ile-personalizasyon-latencysini-40msye-dusurmek.md","tr\u002Ftech\u002Fedge-ssr-ile-personalizasyon-latencysini-40msye-dusurmek","md",1778709807676]