<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yunus Emre Akgün on Medium]]></title>
        <description><![CDATA[Stories by Yunus Emre Akgün on Medium]]></description>
        <link>https://medium.com/@akgunyunus482?source=rss-c74ca4be2b2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*huJc7KjxzhlUI2watI5DLQ.png</url>
            <title>Stories by Yunus Emre Akgün on Medium</title>
            <link>https://medium.com/@akgunyunus482?source=rss-c74ca4be2b2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 08:33:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akgunyunus482/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bir HTTPS İsteğinin Tam Hikayesi]]></title>
            <link>https://medium.com/@akgunyunus482/bir-https-i%CC%87ste%C4%9Finin-tam-hikayesi-7c725cfffb66?source=rss-c74ca4be2b2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c725cfffb66</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[https]]></category>
            <category><![CDATA[tcp]]></category>
            <dc:creator><![CDATA[Yunus Emre Akgün]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 19:18:51 GMT</pubDate>
            <atom:updated>2026-06-30T19:40:31.616Z</atom:updated>
            <content:encoded><![CDATA[<p><em>URL’ye Enter’a bastığın andan ekranda yazıyı gördüğün ana kadar olan her şey. DNS, TCP, TLS, HTTP, modem, kernel, RAM, CPU. Hiçbirini atlamadan, hiçbir soruyu havada bırakmadan.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gVwtPNpLuCGcXEwwxDKDiA.png" /></figure><p>Şöyle başlayayım. Sana ufak bir soru:</p><p>Bir dosyayı diskten read() ile okuduğunda ile bir TCP socket&#39;inden read() ile okuduğunda arasında <strong>gerçekten</strong> ne fark var?</p><p>Çoğu insan refleksle “biri dosya, biri network” der ve geçer. Ama biraz dur. Aynı read() çağrısı. Aynı buffer. Aynı kernel kodu. İkisinde de yaptığın şey: &quot;bana birkaç byte ver.&quot; Kernel sana byte verir. Sen onu programının anladığı bir şeye dönüştürürsün. Diskte mi duruyordu, yoksa Helsinki&#39;deki bir sunucudan kabloyla mı geldi, programın bilmiyor. Hatta umrunda değil. Soyutlamanın yaptığı tam olarak bu zaten.</p><p>İşte bu yazı, o görünmeyen kısmı , byte’ların gerçek yolculuğunu , uzun uzun anlatıyor. URL’ye Enter’a bastığın andan tarayıcının ekrana pixel basmasına kadar her adım, her geçici hal, her dönüşüm.</p><p><a href="https://tr.wikipedia.org/wiki/OSI_modeli">OSI’yi</a> ezbere bilen çok insan var. Yedi katman, sıralarsın geçersin. Sonra bir gün “TLS handshake tam olarak nerede oluyor” ya da “modemden çıkan elektrik sinyali nasıl JSON oluyor” diye sorduğunda kafanda hâlâ bir takım boşluklar var olduğunu fark ediyorsun. Bu yazı o boşlukları kapatmak için. Uzun. Bir kahve al, otur, sırayla oku.</p><h3>Önce büyük resim , mektup metaforu</h3><p>Network’ü anlamanın en hızlı yolu posta sistemiyle düşünmek.</p><p>Diyelim Berlin’desin, Tokyo’daki bir arkadaşına mektup yazıyorsun. Yazıyorsun, zarfa koyuyorsun, adres yazıyorsun, posta kutusuna atıyorsun. Postacı alıyor, sınıflandırma merkezine götürüyor. Sınıflandırma merkezi havayolu kargoya devrediyor. Uçak Tokyo’ya iniyor. Orada başka bir sınıflandırma, başka bir postacı, en sonunda arkadaşının posta kutusu.</p><p>Sen sadece “mektup yazma” işiyle ilgilendin. Postacının zarfa pul yapıştırması, kargo şirketinin uçak ayarlaması, Tokyo’daki dağıtım , bunlar senin için <strong>soyutlanmış</strong> katmanlardı. Sen “mektubu Tokyo’ya gönder” bile demedin; “bunu posta kutusuna koy” dedin, gerisi standartlar sayesinde otomatik aktı. Herkes zarfın nereye gideceğini biliyor, hangi pul ne anlama geliyor, hangi şehir kodu nereye karşılık geliyor.</p><p>Network’te aynısı oluyor. Senin programın “şu URL’deki veriyi getir” diyor. Geri kalan her şey , DNS, TCP handshake, TLS şifreleme, IP routing, modemin elektrik sinyaline çevirmesi, ISP’nin paketi dünyaya iletmesi, başka kıtadaki sunucunun cevap üretmesi, paketin tersine geri gelmesi, kernel’ın yeniden montajı, byte’ların string’e, string’in objeye dönmesi , hepsi katmanlar halinde, standartlar sayesinde otomatik akıyor.</p><p>Önce katmanları tanıyalım, sonra somut bir isteği baştan sona izleyelim.</p><h3>OSI 7-Katmanlı Model , Sahnedeki aktörler</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YjHGPzMBqP4w-YIH-WcZYg.png" /></figure><p><a href="https://tr.wikipedia.org/wiki/OSI_modeli">OSI Modeli</a> 1980&#39;lerin başında <a href="https://en.wikipedia.org/wiki/International_Organization_for_Standardization">ISO</a>’nun ortaya koyduğu teorik bir referans. Network protokollerini 7 katmana bölmüş, “her katmanın bir işi var, üstündekine temiz arayüz sunsun, altındakinin detaylarını saklasın” demiş. Pratikte bunu birebir görmüyoruz ama kafamızda kategori kurmak için hâlâ çok işe yarıyor.</p><p>Yukarıdan aşağıya bakalım:</p><p><strong>7 , Application (Uygulama).</strong> Senin gözünün gördüğü katman. <a href="https://tr.wikipedia.org/wiki/HTTP">HTTP</a>, <a href="https://tr.wikipedia.org/wiki/HTTPS">HTTPS</a>, <a href="https://en.wikipedia.org/wiki/WebSocket">WebSocket</a>, <a href="https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol">SMTP</a> (mail), <a href="https://en.wikipedia.org/wiki/File_Transfer_Protocol">FTP</a> (dosya), <a href="https://tr.wikipedia.org/wiki/Alan_ad%C4%B1_sistemi">DNS</a>, <a href="https://en.wikipedia.org/wiki/Secure_Shell">SSH</a>. Tarayıcı burada yaşıyor. GET /index.html insanın okuduğu komut. &quot;Anlam&quot; burada başlıyor.</p><p><strong>6 , Presentation (Sunum).</strong> Byte’ları yorumlanabilir hale getiren katman. Karakter kodlamaları (<a href="https://tr.wikipedia.org/wiki/UTF-8">UTF-8</a>, <a href="https://tr.wikipedia.org/wiki/ASCII">ASCII</a>), şifreleme (<a href="https://tr.wikipedia.org/wiki/Ta%C5%9F%C4%B1ma_Katman%C4%B1_G%C3%BCvenli%C4%9Fi">TLS</a>), sıkıştırma (<a href="https://en.wikipedia.org/wiki/Gzip">gzip</a>) burada. Modern stack’te bu katmanın sınırları çoktan eridi, TLS’i bazıları 5&#39;e bazıları 6&#39;ya koyar, tartışılır. Ama yaptığı iş net: byte’ları kullanılabilir formata sokmak.</p><p><strong>5 , Session (Oturum).</strong> İki taraf arasında bir “oturum” açma, koruma, kapatma. Eskiden <a href="https://en.wikipedia.org/wiki/Remote_procedure_call">RPC</a>, <a href="https://en.wikipedia.org/wiki/NetBIOS">NetBIOS</a> gibi protokollerde anlamlıydı. Şimdi TCP zaten oturum sağlıyor, üstüne ayrı bir katman koymuyoruz. Modelde yer alıyor ama pratikte fiili olarak görünmez.</p><p><strong>4 , Transport (Taşıma).</strong> <a href="https://tr.wikipedia.org/wiki/TCP">TCP</a> ve <a href="https://tr.wikipedia.org/wiki/UDP">UDP</a> burada. Veriyi paketlere bölmek, sırayı korumak, kaybolanı yeniden göndermek bu katmanın işi. TCP “bu byte’ları sırasıyla ve hatasız ulaştıracağım” diyor. UDP “atıyorum, ulaşırsa ulaşır” diyor. Güvenilirlik dediğimiz şey buradan geliyor.</p><p><strong>3 , Network (Ağ).</strong> <a href="https://tr.wikipedia.org/wiki/%C4%B0nternet_Protokol%C3%BC">IP</a> burada yaşıyor. Her cihazın bir adresi var (<a href="https://tr.wikipedia.org/wiki/IPv4">IPv4</a>: 192.0.2.1 veya <a href="https://tr.wikipedia.org/wiki/IPv6">IPv6</a>: 2001:db8::1). Bu katmanın işi paketleri kaynaktan hedefe yönlendirmek. Senin paket Berlin’den Tokyo’ya giderken belki Frankfurt, Singapur, Hong Kong üzerinden geçiyor. Her duraktaki kutu bir router, hepsi bu katmanda çalışıyor.</p><p><strong>2 , Data Link (Veri Bağlantısı).</strong> Aynı fiziksel ağdaki cihazlar arası haberleşme. <a href="https://tr.wikipedia.org/wiki/Ethernet">Ethernet</a>, <a href="https://tr.wikipedia.org/wiki/IEEE_802.11">Wi-Fi</a> burada. <a href="https://tr.wikipedia.org/wiki/MAC_adresi">MAC adresleri</a> bu katmanın işi. Bir Ethernet kablosuna takılı 4 bilgisayar varsa, hangisinin hangisine konuştuğunu MAC adresleri ayırıyor. Switch’ler buranın oyuncuları.</p><p><strong>1 , Physical (Fiziksel).</strong> Elektrik sinyalleri, ışık darbeleri, radyo dalgaları. Telin içindeki gerilim, fiberdeki ışık, antenden çıkan elektromanyetik dalga. “Bir 1 ya da 0 nasıl iletilir” sorusunun cevabı en altta.</p><blockquote><strong><em>Apartman binası gibi düşün:</em></strong><em> L1 zarfın kendisi, kağıt mürekkep. L2 kapıcı, aynı binadaki dairelere mektup götürüyor. L3 kargocu, farklı binalar arası taşıyor. L4 sınıflandırma sistemi, mektup parçalanmışsa hepsini doğru sırada teslim ediyor. L5 telefon görüşmesinin başı ve sonu, “iki kişi konuşuyor”. L6 dil çevirisi, dil bilinmiyorsa tercüman. L7 mektubun içeriği, gerçek mesaj.</em></blockquote><p>OSI 7 katmanlı model teorik bir referans, demiştim. Gerçek internette kullandığımız <a href="https://tr.wikipedia.org/wiki/TCP/IP">TCP/IP modeli</a> 4 katmanlı. OSI’nin bazı katmanları orada eridi.</p><h3>TCP/IP modeli , pratikteki hali</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqwbpydbzW66-IMTZYfU9w.png" /></figure><p>TCP/IP’nin 4 katmanı şöyle:</p><ol><li><strong>Link</strong> (OSI’nin L1-L2&#39;si) , fiziksel ve veri bağlantısı</li><li><strong>Internet</strong> (OSI’nin L3&#39;ü) , IP</li><li><strong>Transport</strong> (OSI’nin L4&#39;ü) , TCP/UDP</li><li><strong>Application</strong> (OSI’nin L5-L7&#39;si) , HTTP, HTTPS, DNS, vs.</li></ol><p>Yani OSI’nin 5, 6, 7. katmanları TCP/IP’de tek bir <strong>Application</strong> katmanında birleşmiş. Bunun nedeni basit: modern internette bu üçünü ayırmak pratik değil. TLS hem “presentation” (şifreleme) hem “session” (handshake) işi yapıyor, HTTP hem “application” mesajı taşıyor hem TLS’in üstünde duruyor. Net bir sınır yok.</p><p>Bu OSI modelinin işe yaramaz olduğu anlamına gelmiyor. OSI iyi bir öğretim aracı, kafanda kategoriler kurmana yarıyor. Sadece “TLS hangi katmanda” sorusu çıktığında “tartışmalı” demek yerine <em>“şifreleme yapıyor, TCP’nin üstünde, HTTP’nin altında, modern HTTPS akışında handshake’i HTTP’den önce çalışır”</em> demek daha doğru olur.</p><p>Şimdi somut bir isteği baştan sona izleyelim.</p><h3>Sahne , tarayıcına URL yazıyorsun</h3><p>Adres çubuğuna https://example.com yaz, Enter&#39;a bas.</p><p>Sıradaki birkaç yüz milisaniyede senin görmediğin çok şey olacak. Önce gözünün gördüğünden başlayayım, sonra perdenin arkasına ineriz.</p><p><strong>Gördüğün:</strong></p><ol><li>Sayfa boş, sekme çubuğundaki spinner dönüyor.</li><li>Birkaç yüz milisaniye sonra “Example Domain” yazan beyaz bir sayfa yükleniyor.</li><li>Spinner duruyor.</li></ol><p><strong>Görmediğin (kısa özet):</strong></p><ol><li>DNS lookup → “example.com” → 93.184.216.34</li><li>TCP handshake → 3 paket, hiç veri yok</li><li>TLS handshake → 2 round-trip (TLS 1.3&#39;te 1), anahtarlar paylaşılıyor</li><li>HTTP request → asıl istek</li><li>Sunucu sayfayı hazırlıyor</li><li>HTTP response → cevap geri geliyor</li><li>Tarayıcı HTML’i parse ediyor, DOM kuruyor, CSS uyguluyor, JS çalıştırıyor, render ediyor</li><li>Sayfa görünür</li></ol><p>Şimdi bu 8 maddeyi tek tek açıyoruz. Her birinde byte seviyesinde ne oluyor anlatacağım.</p><h3>Adım 1 , DNS: “example.com”den IP adresine</h3><p>Bilgisayar “example.com” yazısını anlamıyor. Network gerçekte IP adresleriyle çalışıyor. Yani önce o yazıyı bir sayıya çevirmemiz lazım.</p><p>Bunu yapan sistem <a href="https://tr.wikipedia.org/wiki/Alan_ad%C4%B1_sistemi">DNS</a>. İnternetin adres defteri diyebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N2GoE6W3J4M2nLLvZnq0Aw.gif" /></figure><p>Akış kabaca şöyle:</p><ol><li><strong>Tarayıcı OS’a soruyor:</strong> “example.com’un IP’si nedir?”</li><li><strong>OS önce kendi cache’ine bakıyor.</strong> Son birkaç dakika içinde başka bir program zaten aynı şeyi sormuşsa cevap orada hazır.</li><li><strong>Cache miss varsa DNS resolver’a gidiyor.</strong> Bu genelde ISP’nin sunucusu (Türk Telekom’unki 195.175.39.40 mesela), ama sen elinle değiştirmiş olabilirsin (<a href="https://1.1.1.1/">Cloudflare 1.1.1.1</a> veya <a href="https://developers.google.com/speed/public-dns">Google 8.8.8.8</a> sık tercih edilenler).</li><li><strong>Resolver kendi cache’ine bakıyor.</strong> Yoksa internetin gerçek isim sistemini sorgulamaya başlıyor:<br> , Önce <a href="https://en.wikipedia.org/wiki/Root_name_server">root DNS server</a>’lara soruyor (dünyada 13 logical root var, fiziksel olarak yüzlerce sunucu): “.com TLD’sine kim bakıyor?”<br> , Root: “Şu sunucuya sor.”<br> , Resolver .com authority&#39;sine gidiyor: &quot;example.com&#39;a kim bakıyor?&quot;<br> - Cevap: &quot;example.com için NS kayıtları şunlar.&quot;<br> - Resolver o authoritative sunuculara gidiyor: &quot;example.com&#39;un A kaydı ne?&quot;<br> - Cevap: &quot;93.184.216.34.&quot;</li><li><strong>Resolver bu cevabı OS’a veriyor</strong>, OS tarayıcıya veriyor, herkes cache’liyor (<a href="https://en.wikipedia.org/wiki/Time_to_live">TTL</a> süresi kadar , 5dk gibi mesela).</li></ol><p>Tipik bir DNS lookup 20–100 milisaniye sürüyor. Cache hit varsa 1ms.</p><p>Bir detay var: DNS <strong>UDP</strong> kullanıyor, TCP değil. Çünkü DNS sorgusu genelde tek paket, hız önemli, cevap kaybolursa bir daha sorulur. TCP’nin handshake yükü buna değmez. (Tabii <a href="https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions">DNSSEC</a> veya büyük cevaplarda TCP’ye düşülüyor.)</p><p>IP’mizi öğrendik: 93.184.216.34. Sırada bu IP ile TCP bağlantısı açmak var.</p><h3>Adım 2 , TCP handshake: üç paket, sıfır veri</h3><p><a href="https://tr.wikipedia.org/wiki/TCP">TCP</a> güvenilir, sıralı, akış kontrollü bir transport protokolü. “Bu byte’lar numaralı, hepsi sırayla ve hatasız ulaşacak” sözü veriyor.</p><p>Bu sözün tutulabilmesi için önce iki tarafın bir “bağlantı” kurması gerekiyor. Buna <a href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Connection_establishment">3-way handshake</a> deniyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zzn-enIxz2f9i4vymGb_5w.gif" /></figure><p>Adımlar şöyle:</p><ol><li><strong>SYN</strong> (Sen → Sunucu): “Bağlantı açmak istiyorum. Benim başlangıç sıra numaram X olacak.” (X rastgele, mesela 1000.)</li><li><strong>SYN-ACK</strong> (Sunucu → Sen): “Tamam, kabul. Benim başlangıç sıra numaram Y olacak. Senin X+1&#39;inci byte’ını bekliyorum.” (Bu, sunucunun senin SYN’ini aldığına dair onayı.)</li><li><strong>ACK</strong> (Sen → Sunucu): “Tamam. Senin Y+1&#39;inci byte’ını bekliyorum.” (Sen de sunucunun SYN’ini onaylıyorsun.)</li></ol><p>Bu üç paket hiçbir uygulama verisi taşımıyor. Sadece “selam, ben varım, anlaştık” diyor. Ama bu el sıkışma yapıldıktan sonra iki yönlü temiz bir kanal açılmış oluyor. Artık iki taraf da diğerine veri yollayabilir, karşı taraf “şunu aldım, sıradaki şunu bekliyorum” deyip onay verir.</p><p>Burada <strong>Round-Trip Time (RTT)</strong> kritik. Berlin-Tokyo bir RTT yaklaşık 250ms. Yani sadece TCP handshake bile en az 1.5 RTT, ~375ms tutuyor. Bu yüzden birden fazla istek için aynı TCP bağlantısını yeniden kullanmak (<a href="https://en.wikipedia.org/wiki/HTTP_persistent_connection">HTTP keep-alive</a>) çok değerli , her seferinde baştan handshake yapmak çok pahalı.</p><p>Bağlantımız var. Ama biz HTTPS dedik, yani şifreleme istiyoruz. Sıra TLS’e geldi.</p><h3>Adım 3 , TLS handshake: şifreleme tam olarak nerede</h3><p><a href="https://tr.wikipedia.org/wiki/Ta%C5%9F%C4%B1ma_Katman%C4%B1_G%C3%BCvenli%C4%9Fi">TLS</a> (eskiden SSL diye bilinen) TCP’nin üstüne bir şifreleme katmanı koyuyor. HTTPS = HTTP + TLS, kabaca.</p><p>TLS’in üç hedefi var, üçü birden:</p><ul><li><strong>Gizlilik (confidentiality):</strong> mesajları kimse okuyamasın.</li><li><strong>Bütünlük (integrity):</strong> mesajları kimse fark edilmeden değiştiremesin.</li><li><strong>Kimlik doğrulama (authentication):</strong> konuştuğun gerçekten o sunucu olsun.</li></ul><p><a href="https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_1.3">TLS 1.3</a> (modern standart) handshake’i 1 RTT’de tamamlıyor. Eski TLS 1.2 2 RTT alıyordu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1K7la5EalnlJDm23MFh73A.gif" /></figure><p>Akış böyle:</p><ol><li><strong>ClientHello</strong> (Sen → Sunucu): “Bağlantı açmak istiyorum, şu TLS versiyonlarını destekliyorum, şu <a href="https://en.wikipedia.org/wiki/Cipher_suite">şifreleme algoritmalarını</a> (cipher suites) biliyorum, rastgele bir sayı (Client Random) gönderiyorum.” TLS 1.3&#39;te bu pakette <strong>key share</strong> da var , <a href="https://tr.wikipedia.org/wiki/Diffie-Hellman_anahtar_de%C4%9Fi%C5%9Fimi">Diffie-Hellman</a> public key’in.</li><li><strong>ServerHello + Certificate + Server Finished</strong> (Sunucu → Sen): “Tamam, şu cipher suite’i seçtim, benim Server Random’ım bu. İşte sertifikam , beni şu <a href="https://en.wikipedia.org/wiki/Certificate_authority">Certificate Authority</a> (<a href="https://letsencrypt.org/">Let’s Encrypt</a>, <a href="https://www.digicert.com/">DigiCert</a>, vb.) imzalamış. Sertifikada domain adı, expiration, public key var. İşte benim key share’im. Sertifikayı kontrol et, ortak anahtarımızı hesapla, şifreli konuşmaya geçelim.”</li><li><strong>Sen sertifikayı doğruluyorsun:</strong><br> , CA imzasını kontrol ediyorsun (OS’un trusted CA listesi var, /etc/ssl/cert.pem veya benzeri).<br> - Sertifikadaki domain adı senin gittiğin domain ile eşleşiyor mu?<br> - Süresi geçmiş mi?<br> - <a href="https://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol">CRL/OCSP</a> iptal listesinde mi?</li><li><strong>Client Finished</strong> (Sen → Sunucu): “Anlaştık. Bundan sonra her şey şifreli.”</li></ol><p>Bu noktada <strong>simetrik bir anahtar</strong> üretilmiş oluyor. Diffie-Hellman’ın sihri burada: iki taraf birbirinin public key’i ile aynı session key’i bağımsız olarak hesaplıyor, ama hiçbiri wire’a yazılmadan. Birisi trafiği dinlese bile elinde sadece public key’ler oluyor, asıl session key’i türetemiyor. Bundan sonraki tüm trafik bu key ile şifreleniyor.</p><p>Önemli olan şu: sertifika doğrulaması ile şifreleme <strong>farklı şeyler</strong>. Sertifika “bu sunucu gerçekten example.com” diyor. Şifreleme “kimse aramızdakini okuyamasın” diyor. İkisi birlikte HTTPS’i güvenli kılıyor.</p><blockquote><strong><em>Bankaya gitmek gibi düşün.</em></strong><em> Önce kapıdaki güvenlik kimliğini kontrol ediyor (sertifika). İçeri girdikten sonra konuşman sessiz, kimse duyamıyor (şifreleme). Eğer kimlik sahte olsaydı (yanlış sertifika) ya da konuşma duyulabilir olsaydı (şifresiz), banka olarak güvenmezdin. İkisi birlikte gerekiyor.</em></blockquote><p>TLS 1.3 handshake yaklaşık 150ms ek tutuyor (1 RTT, Berlin-Tokyo gibi). Yani DNS + TCP + TLS toplamda 600–800ms olabiliyor, ilk istek için. Sonraki istekler aynı TLS bağlantısını kullandığı için ek yük yok.</p><h3>Adım 4 , HTTP request: senin gerçekten yollamak istediğin şey</h3><p>Sonunda gerçek isteği yollayabiliriz. TCP socket açık, TLS şifrelemesi hazır. Tarayıcı bir HTTP request hazırlıyor.</p><p>Wire’a giden byte’lar tam olarak şuna benziyor (TLS şifrelemesinden önce, <strong>plaintext</strong>):</p><pre>GET / HTTP/1.1<br>Host: example.com<br>User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9<br>Accept-Encoding: gzip, deflate, br<br>Accept-Language: tr-TR,tr;q=0.9,en;q=0.8<br>Connection: keep-alive</pre><p>(Sondaki çift \r\n\r\n body olmadığını belirtiyor.)</p><p>Bu metin byte byte TLS katmanına veriliyor. TLS bunu cipher suite ile şifreliyor. Şifrelenmiş bayt’lar TCP’ye veriliyor. TCP onları paketlere ayırıyor (her TCP segment maksimum 1460 byte civarı, <a href="https://en.wikipedia.org/wiki/Maximum_segment_size">MSS</a> limiti). Her segmentin önüne TCP header (kaynak port, hedef port, sıra numarası, ACK numarası, flag’ler) ekleniyor. Bunlar IP katmanına veriliyor, IP header (kaynak IP, hedef IP, <a href="https://en.wikipedia.org/wiki/Time_to_live">TTL</a>, vb.) ekleniyor. IP paketleri Ethernet katmanına veriliyor, Ethernet header (kaynak MAC, hedef MAC) ekleniyor. Sonra fiziksel olarak kablodan veya kablosuzdan ilk hop’a , senin router’ına , gidiyor.</p><p>Yani senin “GET /” dediğin şey kablodan çıkarken aşağı yukarı şu yapıda:</p><pre>[Ethernet Header][IP Header][TCP Header][TLS Encrypted Payload]<br>   14 byte         20 byte    20 byte       ~500 byte (encrypted)</pre><p>Her katman bir öncekinin output’unu <strong>payload</strong> olarak alıp kendi header’ını ekliyor. Buna <a href="https://en.wikipedia.org/wiki/Encapsulation_(networking)">encapsulation</a> diyoruz.</p><blockquote><strong><em>Yine mektup metaforu.</em></strong><em> Mektubu yazıyorsun (HTTP request). Zarfa koyuyorsun, üstüne arkadaşın adı (TLS). Zarfı bir kargo poşetine koyuyorsun, üstüne adres (TCP). Kargo poşetini bir konteynere koyuyorsun, üstüne konteyner numarası (IP). Konteyneri bir kamyona yüklüyorsun, kamyonun plakası belli (Ethernet). Kamyon hareket ediyor.</em></blockquote><h3>Adım 4.5 , HTTP/1.1, HTTP/2, HTTP/3: yıllar içinde değişen yük</h3><p>Yukarıdaki örnek <a href="https://en.wikipedia.org/wiki/HTTP/1.1">HTTP/1.1</a> (1997 standardı). Modern web bundan çok ötede artık. Üç ana versiyon var, kısaca üzerinden geçelim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DdK2MCQMOWeEPVotVkoIyg.png" /></figure><p><strong>HTTP/1.1</strong> , text-based, insan okuyor. Tek TCP bağlantısı üzerinde bir istek + bir cevap. Sıradakini gönderebilmek için ya yeni bağlantı açıyorsun (yavaş) ya da <a href="https://en.wikipedia.org/wiki/HTTP_persistent_connection">keep-alive</a> ile aynı bağlantıyı kullanıyorsun, ama istekler <strong>sırayla</strong> gidiyor. Bu yüzden tarayıcılar aynı domain’e 6 paralel TCP bağlantısı açar. Sayfada 30 resim varsa, 6 bağlantı üzerinden gruplanıyor.</p><p><strong>HTTP/2</strong> (2015) , Google’ın <a href="https://en.wikipedia.org/wiki/SPDY">SPDY</a> deneyiminden doğdu. Binary protokol, multiplexed. Tek TCP bağlantısı üzerinde paralel stream’ler taşınıyor. Header’lar <a href="https://en.wikipedia.org/wiki/HPACK">HPACK</a> ile sıkıştırılıyor. Server push ile sunucu istemediğin şeyleri öne çıkarabiliyor. Güzel ama bir gizli sorunu var: tek TCP bağlantısı, demek ki <strong>TCP head-of-line blocking</strong> hâlâ var. Bir paket kaybolursa tüm stream’ler durup onu bekliyor.</p><p><strong>HTTP/3</strong> (2022) , bu sorunu çözmek için tabandan değişti. TCP yerine UDP’nin üstüne kurulmuş <a href="https://en.wikipedia.org/wiki/QUIC">QUIC</a> protokolünü kullanıyor. QUIC kendi reliability, ordering ve şifreleme katmanını içeriyor. Stream’ler bağımsız: bir paket kaybı sadece kendi stream’ini etkiliyor, diğerleri akmaya devam ediyor. Ek bir bonus: önceden konuştuğun bir sunucuya tekrar bağlanırken handshake yapmadan ilk paketle birlikte HTTP isteği yollayabiliyorsun (<strong>0-RTT</strong>). Berlin-Tokyo’da bu 250ms kazanç demek.</p><p>Modern tarayıcılar üçünü de destekliyor. Cloudflare, Google, Facebook gibi büyük platformlar HTTP/3&#39;e geçti. Tarayıcının DevTools’unda Network sekmesinde Protocol sütununu açarsan hangi versiyon kullanıldığını görebilirsin.</p><h3>Adım 5 , Paketler bilgisayardan çıkıyor: kernel, NIC, modem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z76BChujzdXe8UJEYUheMQ.png" /></figure><p>Tarayıcın write() syscall&#39;u ile şifreli byte&#39;ları socket&#39;e yazıyor. Bu syscall <strong>userspace</strong>&#39;den <strong>kernel space</strong>&#39;e geçiyor. Kernel&#39;de şu sırayla iş dönüyor:</p><ol><li><strong>Socket buffer</strong> (skb): bilgisayarın RAM’inde bir buffer. Byte’lar buraya kopyalanıyor.</li><li><strong>TCP stack</strong>: kernel’in içindeki TCP implementation buffer’daki byte’ları alıyor, MSS’e bölüyor, header ekliyor.</li><li><strong>IP stack</strong>: TCP segment’lerini alıyor, IP header ekliyor. Routing tablosuna bakıyor (route -n ile sen de görebilirsin), bu paket nereye gitmeli? Default gateway (genelde senin router&#39;ın) bulunuyor.</li><li><strong>NIC driver</strong>: paketleri Network Card’a yazıyor.</li><li><strong>Network Card</strong>: paketleri Ethernet frame’lerine sarıyor, MAC adresleriyle, elektrik sinyallerine çeviriyor.</li></ol><p><a href="https://en.wikipedia.org/wiki/Direct_memory_access">DMA</a> (Direct Memory Access) burada güzel bir detay. Network Card’ın RAM’den byte okuması için CPU müdahalesi gerekmiyor , kartın kendi DMA engine’i RAM’i okuyor. CPU başka şeyle ilgileniyor. Paketler bittiğinde NIC bir <a href="https://en.wikipedia.org/wiki/Interrupt">interrupt</a> fırlatıyor. CPU bir an duruyor, interrupt handler çalışıyor, paketin gönderildiği işaretleniyor.</p><p><strong>Network Card’dan sonra modem.</strong> Wi-Fi ise NIC’in anteni elektromanyetik dalga olarak yayıyor. Ethernet ise kabloda elektrik gerilimi olarak gönderiyor.</p><p>Modemin kendisi (genelde aynı zamanda router) iki ana iş yapıyor. Birincisi modulasyon/demodülasyon: adı zaten oradan geliyor (<strong>Mo</strong>dulator-<strong>Dem</strong>odulator), dijital sinyali (0/1) analog medyaya (kablo, fiber, RF, <a href="https://en.wikipedia.org/wiki/Asymmetric_digital_subscriber_line">ADSL</a> ses kanalı) çevirip tersini yapıyor. İkincisi <a href="https://tr.wikipedia.org/wiki/A%C4%9F_adresi_%C3%A7evirisi">NAT</a> (Network Address Translation): ev içi cihazlarının lokal IP’lerini (192.168.1.x gibi) tek bir public IP&#39;ye çeviriyor. ISP sana genelde tek IP veriyor, modemin arkasındaki 10 cihaz onu paylaşıyor. Hangi paketin hangi cihaza ait olduğunu modem bir port mapping tablosuyla takip ediyor.</p><p>Modem paketi ISP’ye iletiyor.</p><h3>Adım 5.5 , İnternet omurgası: BGP ve denizaltı fiber</h3><p>Paket senin ISP’ne ulaştı (Türk Telekom, Vodafone, Superonline, hangisi olursa). Şimdi Hollanda’daki sunucuya nasıl gidiyor?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofANDz8tgsWcRyAXmoAi4w.png" /></figure><p>İnternet aslında tek bir network değil. On binlerce bağımsız ağın birbirine bağlanmasından oluşan bir ağlar ağı. Her bir ağ bir <a href="https://en.wikipedia.org/wiki/Autonomous_system_(Internet)">Autonomous System (AS)</a>. Türk Telekom bir AS (AS9121), Cloudflare bir AS (AS13335), Google bir AS (AS15169). Hepsinin 1–5 haneli bir numarası var.</p><p>AS’ler birbirine konuşmak için <a href="https://en.wikipedia.org/wiki/Border_Gateway_Protocol">BGP</a> kullanıyor , Border Gateway Protocol. BGP “internetin yapıştırıcısı” diye düşünebiliriz. Her AS, kendisinden hangi hedeflere ulaşılabileceğini komşu AS’lerine duyuruyor. Komşular bu bilgiyi kendi tablolarına ekliyor, sonra kendi komşularına iletiyor. Sonuçta her router dünyadaki her IP bloğuna gidecek bir yol biliyor oluyor.</p><p>Senin paket Türk Telekom’a ulaşınca onların BGP routing tablosuna bakılıyor. “93.184.216.34&#39;e nasıl gidilir?” Cevap: “Önce şu komşu AS’ye, sonra şu omurga sağlayıcıya, sonra Frankfurt’taki <a href="https://en.wikipedia.org/wiki/Internet_exchange_point">IXP</a>’a, oradan Hollanda’ya.”</p><p><a href="https://en.wikipedia.org/wiki/Internet_exchange_point">IXP</a> (Internet Exchange Point) farklı AS’lerin fiziksel olarak buluşup trafik değiştirdiği yer. Frankfurt’taki <a href="https://en.wikipedia.org/wiki/DE-CIX">DE-CIX</a> dünyanın en büyüğü, yüzlerce AS terabit’lik trafik değiştiriyor. İstanbul’da <a href="https://www.istanbulix.net/">ISTANBUL-IX</a> var.</p><p>Uluslararası trafik denizaltı fiber kabloları üzerinden geçiyor. Dünyada 500&#39;den fazla denizaltı kablosu var, hepsi haritalanmış: <a href="https://www.submarinecablemap.com/">submarinecablemap.com</a> (bir bak istersen, ilginç). Türkiye’den Avrupa’ya çıkış genelde <a href="https://en.wikipedia.org/wiki/SEA-ME-WE_5">SEA-ME-WE-5</a> ya da MedNautilus üzerinden. Bu kabloların kopması ülke çapında bağlantı sorunu yaratabiliyor. 2008&#39;de Mısır kıyısında SEA-ME-WE-4 koptu, Türkiye + Hindistan + Mısır saatlerce zorlandı.</p><p>Berlin → Frankfurt → Hollanda gibi kısa rotalar 10–30ms. Türkiye → ABD 100–150ms. Türkiye → Avustralya 250–300ms. Bu gecikmeler ışık hızı sınırından geliyor , fiber kablodaki ışık vakum hızının yaklaşık üçte ikisi. Frankfurt’tan New York’a 6,000 km, teorik minimum tek yön 30ms. Bunun altına inemiyoruz, fizik izin vermiyor.</p><h3>Adım 6 , Sunucu cevabı üretiyor</h3><p>Sunucuda aynı katmanlar ters sırada çalışıyor.</p><ol><li><strong>NIC</strong> bit’leri alıyor, byte’lara çeviriyor, kernel’a iletiyor.</li><li><strong>Kernel TCP/IP stack</strong> Ethernet header’ı sıyrıyor, IP header’ı sıyrıyor, TCP segment’lerini sıralarına göre yeniden montajlıyor.</li><li><strong>TLS şifresini çözüyor.</strong> Şimdi elinde plaintext HTTP request var.</li><li>Sunucu uygulaması (<a href="https://nginx.org/">nginx</a>, <a href="https://httpd.apache.org/">Apache</a>, Node.js, Go HTTP server, hangisi olursa) bu request’i parse ediyor.</li><li>Uygulama mantığı çalışıyor. Static site ise dosyayı diskten okuyor. Dinamik ise database sorgusu çalıştırıyor, template render ediyor.</li><li>Response HTML üretiliyor: &lt;html&gt;&lt;body&gt;&lt;h1&gt;Example Domain&lt;/h1&gt;...&lt;/body&gt;&lt;/html&gt;.</li><li>Response HTTP olarak format’lanıyor:</li></ol><pre>HTTP/1.1 200 OK<br>Content-Type: text/html; charset=UTF-8<br>Content-Length: 1256<br>Server: ECS (dcb/7F5A)<br>Cache-Control: max-age=604800<br>Date: Sat, 28 Jun 2026 14:23:01 GMT</pre><pre>&lt;!doctype html&gt;<br>&lt;html&gt;<br>...</pre><ol><li>Aynı encapsulation tersinden tekrar ediyor: HTTP body → TLS encrypt → TCP segments → IP packets → Ethernet frames → wire.</li></ol><p>Senin browser’ına gelmek için aynı yolu <strong>ters</strong> kat ediyor: sunucunun ISP’si, omurga, denizaltı kablolar, senin ISP’n, modem, kablo, NIC.</p><h3>Adım 7 , Byte’lar bilgisayarına geri geliyor</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z5uTr9QuPyQoftq4P0lbTg.gif" /></figure><p>Modemin paketi alıyor. NAT tablosuna bakıyor, “bu IP+port’a giden paket ev içindeki hangi cihaza ait?” diyor, doğru cihaza yönlendiriyor.</p><p>Bilgisayarının NIC’i paketi alıyor. Ethernet header’a bakıp “bu benim MAC adresime gelmiş” diyor, kabul ediyor.</p><p>NIC paketi DMA ile RAM’deki <a href="https://en.wikipedia.org/wiki/Circular_buffer">ring buffer</a>’a yazıyor. Sonra CPU’ya interrupt fırlatıyor: “yeni paket var!”</p><p>CPU interrupt handler’ı çalıştırıyor. Linux’ta bu <a href="https://en.wikipedia.org/wiki/Interrupt#Software_interrupts">softirq</a> mekanizması ile oluyor. Interrupt’un kendisi çok kısa (paketi tanıyor, “geldi” işaretliyor), gerçek işlem softirq context’inde sonradan yapılıyor. Bu sayede CPU başka kritik işleri yarıda bırakmıyor.</p><p>Sonra kernel network stack sırasıyla:</p><ol><li><strong>Ethernet katmanı</strong>: frame’i söküyor, IP packet’i çıkarıyor. Checksum kontrol ediyor.</li><li><strong>IP katmanı</strong>: IP packet’i çözüyor. Hedef IP gerçekten benim mi? TTL azalıyor. Fragment’leri (paket bölünmüşse) yeniden birleştiriyor.</li><li><strong>TCP katmanı</strong>: TCP segment’i çözüyor. Sıra numarasına bakıyor. Beklenen sıra numarasıysa socket buffer’a ekliyor. İleri bir numaraysa (önündeki paket henüz gelmedi), “out-of-order” listesine koyuyor. ACK fırlatıyor, kabul ettiğini sunucuya bildiriyor.</li><li><strong>Socket’e bağlı uygulamayı uyandırıyor</strong>: “okuyacak data var, <a href="https://en.wikipedia.org/wiki/Epoll">epoll</a>/select/poll ile bekleyen process&#39;in geri dön&quot;.</li></ol><p>Browser process’i read() syscall&#39;undan dönüyor. Elinde <strong>şifreli byte&#39;lar</strong> var.</p><p>Browser’ın TLS library’si (<a href="https://www.openssl.org/">OpenSSL</a>, <a href="https://boringssl.googlesource.com/boringssl/">BoringSSL</a>, her ne ise) byte’ları decrypt ediyor. Şimdi elinde plain HTTP response var.</p><h3>Bonus: TCP congestion control , network neden bazen yavaşlıyor</h3><p>Gözden kaçırılan ama hayati bir mekanizmaya değinmek istiyorum: TCP’nin akış kontrolü.</p><p>TCP basit bir kural izliyor: “her aldığım ACK, bana ‘sıradakini gönder’ diyor.” Ama kaç tane sıradakini gönderebilirim? Çok hızlı gönderirsem ağ tıkanıyor, paketler düşüyor, herkes kaybediyor. Çok yavaş gönderirsem bant genişliğini kullanmıyorum. Bu dengeyi kuran sistem: <a href="https://en.wikipedia.org/wiki/TCP_congestion_control">TCP Congestion Control</a>.</p><p>Klasik algoritma , <a href="https://en.wikipedia.org/wiki/Additive_increase/multiplicative_decrease">Slow Start + AIMD</a>:</p><ol><li><strong>Slow start</strong>: bağlantı yeni açıldı. “Ne kadar gönderebilirim?” Önce 1 paket, ACK gelirse 2 paket, sonra 4, 8 , üssel artış. Bir paket kaybolana kadar devam ediyor.</li><li><strong>Bir paket kayboldu</strong> (ACK gelmedi, timeout). “Tıkanma var, ben fazla gönderiyorum.” Pencereni yarıya indiriyor (multiplicative decrease).</li><li><strong>Sonra tekrar artış</strong>, ama bu kez doğrusal , her RTT’de pencereyi 1 birim büyütüyor (additive increase).</li></ol><p>Yani TCP sürekli “ne kadar gönderebilirim?” sorusunu dengelemeye çalışıyor. Bu yüzden Netflix izlerken kalite anlık değişiyor , ağ tıkandı, TCP yavaşladı, kalite düştü. Tıkanma geçti, TCP hızlandı, kalite arttı.</p><p>Modern Linux çekirdeği <a href="https://en.wikipedia.org/wiki/CUBIC_TCP">CUBIC</a> algoritmasını kullanıyor (default). Google 2016&#39;da <a href="https://en.wikipedia.org/wiki/TCP_congestion_control#TCP_BBR">BBR</a>’ı açıkladı (Bottleneck Bandwidth and Round-trip propagation time). BBR paket kaybını değil gerçek bant genişliği + RTT ölçüsünü kullanan farklı bir yaklaşım. YouTube ve Google Cloud BBR’a geçti.</p><p>Pratik sonucu şu: dosya indirirken hızın sabit değil, dalgalı bir grafik çiziyor olması normal. TCP sürekli ölçüm yapıyor, ağ koşullarına uyum sağlıyor.</p><h3>Adım 8 , Byte’lar nasıl string oluyor: karakter kodlama</h3><p>Şimdi başka bir sorunun cevabını verme zamanı: byte ile karakter aynı şey mi?</p><p><strong>Hayır.</strong> Byte 0–255 arası bir sayı. Karakter ise dilbilimsel bir kavram , “A”, “ş”, “🐱”, “أ”. İkisini ilişkilendiren şey <a href="https://en.wikipedia.org/wiki/Character_encoding">karakter kodlama</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tY5kQbHjnrdrH3w2y0Altg.png" /></figure><p>Eski standart <a href="https://tr.wikipedia.org/wiki/ASCII">ASCII</a> sadece 128 karakter tanımlıyordu (Latin alfabesi + sayı + sembol), her karakter 1 byte. Türkçe için yetmedi. Sonra <a href="https://en.wikipedia.org/wiki/ISO/IEC_8859-9">ISO-8859–9</a>, <a href="https://en.wikipedia.org/wiki/Windows-1254">Windows-1254</a> gibi region-specific encoding’ler çıktı , hâlâ 1 byte per karakter ama farklı setler. Web’in ilk yıllarındaki “ı” yerine “?” karmaşaları hep bu uyumsuzluktan.</p><p>Modern web’in standardı <a href="https://tr.wikipedia.org/wiki/UTF-8">UTF-8</a>. <a href="https://tr.wikipedia.org/wiki/Unicode">Unicode</a> tüm dünya dillerini içeren bir code point tablosu (130,000&#39;den fazla karakter). UTF-8 her karakteri 1–4 byte arasında değişen şekilde encode ediyor:</p><p>Karakter Unicode UTF-8 byte’ları Uzunluk A U+0041 41 1 byte ş U+015F C5 9F 2 byte → U+2192 E2 86 92 3 byte 🐱 U+1F431 F0 9F 90 B1 4 byte</p><p>İlk byte’ın değeri kaç byte’lık bir karakter olduğunu söylüyor:</p><ul><li>0xxxxxxx → 1 byte (ASCII compatible)</li><li>110xxxxx → 2 byte</li><li>1110xxxx → 3 byte</li><li>11110xxx → 4 byte</li></ul><p>Devam byte’ları 10xxxxxx formatında.</p><p>HTTP response’ın Content-Type header&#39;ı charset=UTF-8 diyor. Browser bunu görüp body byte&#39;larını UTF-8 olarak decode etmesi gerektiğini biliyor.</p><p>Bu noktada elinde <strong>string</strong> var. JavaScript engine’in (<a href="https://en.wikipedia.org/wiki/V8_(JavaScript_engine)">V8</a>, <a href="https://en.wikipedia.org/wiki/JavaScriptCore">JavaScriptCore</a>, vb.) içinde bir String objesi olarak duruyor. (Detay: V8&#39;in iç implementasyonu UTF-16 kullanıyor , yine aynı veri, farklı bellek representation&#39;ı.)</p><h3>Adım 9 , String’den objeye: parsing</h3><p>Browser’ın artık &lt;!doctype html&gt;&lt;html&gt;...&lt;/html&gt; diye bir string&#39;i var. Ama bu hâlâ text. Render edebilmek için bunu yapılandırılmış bir hale getirmek lazım.</p><p><a href="https://en.wikipedia.org/wiki/HTML_parser">HTML parser</a> devreye giriyor:</p><ol><li><strong>Tokenization</strong>: string’i token’lara bölüyor. &lt;html&gt; bir token, &lt;body&gt; bir token, Hello text token, &lt;/body&gt; close token, vs.</li><li><strong>Tree construction</strong>: token’lardan <a href="https://en.wikipedia.org/wiki/Document_Object_Model">DOM ağacı</a> kuruyor. Her HTML elementi bir DOM node’u. Parent-child ilişkileri kurulu.</li><li><strong>İlginç bir detay</strong>: HTML parsing aslında inanılmaz karmaşık. Bozuk HTML’i bile tolere edip “browser doğru anlasın” diye onlarca özel case var. Spec <a href="https://html.spec.whatwg.org/">WHATWG HTML Living Standard</a>, bin sayfaya yakın.</li></ol><p>JSON için aynı iş daha kolay:</p><pre>{&quot;name&quot;: &quot;Ali&quot;, &quot;age&quot;: 30, &quot;tags&quot;: [&quot;dev&quot;, &quot;tr&quot;]}</pre><p><a href="https://tr.wikipedia.org/wiki/JSON">JSON</a> parser (her dilin standart kütüphanesi var) string’i token’lara böl , {, &quot;name&quot;, :, &quot;Ali&quot;, ,, ... , sonra ağaca çeviriyor. JavaScript&#39;te JSON.parse() bunu yapıyor ve geriye sana bir object veriyor:</p><pre>const obj = JSON.parse(responseBody);<br>obj.name    // &quot;Ali&quot;<br>obj.tags[0] // &quot;dev&quot;</pre><p>obj artık RAM&#39;de bir veri yapısı. <a href="https://en.wikipedia.org/wiki/Hash_table">Hash table</a> ya da internal map. Anahtar-değer çiftleri pointer&#39;larla birbirine bağlı.</p><h3>Adım 10 , RAM ve CPU’da neler dönüyor</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BekjZEUt3Xi00usBqz3fow.png" /></figure><p>obj.name yazıp çalıştırdığında perdenin arkasında bir sürü şey oluyor.</p><p><a href="https://en.wikipedia.org/wiki/Memory_hierarchy">Memory hierarchy</a> , bellek hiyerarşisi , önemli bir kavram. CPU’nun çalışma hızı RAM hızından çok ama çok daha hızlı. Aradaki uçurumu kapatmak için <a href="https://en.wikipedia.org/wiki/CPU_cache">cache</a> katmanları var:</p><p>Katman Hız Boyut CPU Cycles Register &lt;1ns byte 1 L1 cache ~1ns 32–64 KB 3–4 L2 cache ~3ns 256–1024 KB 10–15 L3 cache ~10ns 4–32 MB 30–50 RAM ~100ns GB 200–300 SSD ~100µs TB 100,000+</p><p>RAM erişimi register erişiminden 200–300 kat yavaş. SSD ise 100,000 kat. Bu yüzden CPU akıllı tahminler yapıyor , sık erişilen veriyi cache’e yüklüyor, <a href="https://en.wikipedia.org/wiki/Branch_predictor">branch prediction</a> yapıyor, <a href="https://en.wikipedia.org/wiki/Cache_prefetching">prefetching</a> yapıyor. Aksi takdirde GHz’ler bandında çalışan bir makineyi RAM hızına demirlemiş olurduk.</p><p><a href="https://en.wikipedia.org/wiki/Memory_management">Stack vs Heap</a>. Bellek iki ana bölgeye ayrılıyor (basitleştirilmiş):</p><ul><li><strong>Stack</strong>: fonksiyon çağrıları, local değişkenler. LIFO. Çok hızlı (sadece pointer aşağı yukarı oynuyor). Sabit boyutlu veriler için.</li><li><strong>Heap</strong>: dinamik olarak ayrılan büyük yapılar , JSON objesi, array, string. Yavaş ama esnek. <a href="https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)">Garbage collector</a> (JS, Java, Go) ya da manuel (C, Rust) yönetiliyor.</li></ul><p>JavaScript’te JSON.parse() heap&#39;te yeni bir object yaratıyor. obj değişkeni stack&#39;te bir pointer (heap&#39;teki objeye işaret eden). obj.name ifadesi:</p><ol><li>CPU obj pointer&#39;ını stack&#39;ten alıyor (register&#39;a).</li><li>Heap’teki objeye gidiyor.</li><li>Object internal layout’unda “name” key’ini buluyor (V8&#39;de <a href="https://v8.dev/blog/hidden-classes">hidden classes</a> optimizasyonu var, hash lookup’ı tipik için O(1)).</li><li>“Ali” string’inin pointer’ını alıyor.</li><li>Sana o pointer’ı veriyor.</li></ol><p>Hepsi nanosaniyelerde oluyor. Modern CPU’lar saniyede milyarlarca işlem yapıyor. Browser’ının 60 FPS sayfa render edebiliyor olması, bu işlerin ne kadar hızlı döndüğünün göstergesi.</p><h3>Adım 11 , Rendering: DOM’dan pixel’e</h3><p>DOM ağacı hazırlanınca tarayıcının ikinci işi rendering.</p><p>Üst düzey adımlar:</p><ol><li><a href="https://en.wikipedia.org/wiki/CSS_Object_Model">CSSOM</a>: CSS dosyalarını parse edip CSS Object Model üretiyor. DOM ile birleşince hangi elemana hangi stil uygulanacağı belli oluyor.</li><li><strong>Render tree</strong>: görünmeyen elemanlar (örn. display: none) hariç bırakılıp render ağacı kuruluyor.</li><li><strong>Layout (reflow)</strong>: her elemanın ekranda nereye düşeceği hesaplanıyor , width, height, position, vs. CSS engine’in işi.</li><li><strong>Paint</strong>: her elemanın “görsel komutları” üretiliyor (line draw, fill rect, text).</li><li><strong>Compositing</strong>: GPU’ya gönderiliyor, layer’lar birleştiriliyor, en sonunda pixel’ler ekrana basılıyor.</li></ol><p>JavaScript ayrı bir thread’de <a href="https://en.wikipedia.org/wiki/V8_(JavaScript_engine)">V8</a> (Chrome) veya <a href="https://en.wikipedia.org/wiki/JavaScriptCore">JavaScriptCore</a> (Safari) veya <a href="https://en.wikipedia.org/wiki/SpiderMonkey">SpiderMonkey</a> (Firefox) içinde çalışıyor. <a href="https://en.wikipedia.org/wiki/Just-in-time_compilation">JIT compiler</a> ile yorumlanmış kod gerçek makine koduna çevriliyor, hızlanıyor. Bu kendi başına bir yazı olabilir, derin bir alan.</p><h3>Bonus: browser güvenliği , sayfa nasıl korunuyor</h3><p>Buraya kadar her şey güzel ama göz ardı edilen kritik bir konu var: güvenlik. Browser paranoyak olmak zorunda çünkü bir sürü farklı kaynaktan kod ve veri çalıştırıyor.</p><p>Üç temel mekanizma:</p><p><strong>1. </strong><a href="https://en.wikipedia.org/wiki/Same-origin_policy"><strong>Same-Origin Policy</strong></a><strong> (SOP).</strong> İki kaynak (origin) “aynı” sayılmak için scheme + host + port üçlüsünün tam eşleşmesi gerekiyor. https://example.com:443 ile https://example.com:8080 farklı origin. http://example.com ile https://example.com da farklı. Bir origin&#39;deki JavaScript başka bir origin&#39;in DOM&#39;una, cookie&#39;sine, localStorage&#39;ına dokunamıyor. Bu sayede kötü bir site açtığında, sekmelerindeki banka oturumlarına bulaşamıyor.</p><p><strong>2. </strong><a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing"><strong>CORS</strong></a><strong> (Cross-Origin Resource Sharing).</strong> SOP çok katı. Bazen başka origin’den veri çekmek gerekiyor (API’ler). Bu durumda sunucu özel bir HTTP header (Access-Control-Allow-Origin) ile &quot;evet, şu origin benden okuyabilir&quot; diyor. Browser bu izni kontrol ediyor, yoksa fetch hata veriyor. CORS&#39;un karmaşıklığı çoğu junior dev&#39;in saçını koparıyor , preflight OPTIONS isteği, credentials, header&#39;lar arası nüans, az değil.</p><p><strong>3. </strong><a href="https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content"><strong>Mixed content</strong></a><strong>.</strong> HTTPS sayfada HTTP kaynak (resim, script) yüklemek yasak. Mantığı şu: TLS’in koruduğu bir sayfaya, şifresiz bir kanal üstünden script yüklersen, ortadaki adam (MITM) o script’i değiştirip sayfanı kontrol edebilir. Browser buna “mixed content” diyor ve script’leri direkt blokluyor.</p><p>Bunlara ek olarak: <a href="https://en.wikipedia.org/wiki/Content_Security_Policy">CSP</a> , sayfa hangi script’leri çalıştırabilir, hangi origin’den, inline’a izin var mı. <a href="https://en.wikipedia.org/wiki/Subresource_Integrity">SRI</a> , bir CDN’den çektiğin script’in hash’ini önceden tanımlıyorsun, CDN değişirse browser yüklemiyor. <a href="https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security">HSTS</a> , sunucu “bana sadece HTTPS ile gel” diyebiliyor.</p><p>Hepsi modern web’in görünmez şekilde iş yapan parçaları. Her sayfa yüklenirken arkaplanda sessizce çalışıyorlar.</p><h3>Soruya dönelim: TCP socket okumak ile dosya okumak , gerçekten aynı mı?</h3><p>Yazının başındaki soruyu hatırlıyor musun? Şimdi cevabı daha güzel verebilirim.</p><p>POSIX sistemlerde (Linux, macOS, BSD, vb.) <a href="https://en.wikipedia.org/wiki/Everything_is_a_file">“her şey dosyadır”</a> felsefesi var. <a href="https://en.wikipedia.org/wiki/File_descriptor">File descriptor</a> dediğimiz integer, bir kernel resource’unu temsil ediyor. Dosya, socket, pipe, terminal, device , hepsi bir file descriptor. Üzerlerinde aynı read(), write(), close() syscall&#39;ları çalışıyor.</p><pre>int fd = open(&quot;data.txt&quot;, O_RDONLY);<br>char buf[1024];<br>read(fd, buf, sizeof(buf));  // dosyadan oku</pre><pre>int sock = socket(AF_INET, SOCK_STREAM, 0);<br>connect(sock, ...);<br>char buf[1024];<br>read(sock, buf, sizeof(buf));  // network&#39;ten oku</pre><p>İki kod parçası userspace’ten bakınca aynı. Aynı syscall, aynı buffer, aynı semantic , “bana en fazla 1024 byte ver, kaç tane verdiğini söyle.”</p><p>Kernel’in <strong>içinde</strong> elbette farklı. Dosya için <a href="https://en.wikipedia.org/wiki/Virtual_file_system">VFS layer</a> → file system driver → block device → SSD/HDD. Socket için TCP stack → IP → NIC driver → NIC. Ama bu detaylar soyutlamanın altında saklı. Programın bunları görmüyor, görmesine de gerek yok.</p><p>Bu felsefenin gücü büyük. Aynı kod hem dosya hem socket okuyabiliyor. cat, grep, head gibi tool&#39;lar dosya da socket de fark etmiyor, pipe&#39;lardan besleniyorlar. tail -f bir dosyayı izlerken nc ile socket&#39;i izlemek arasında çok küçük fark var.</p><p>Buradan çıkan ders bence şu: <strong>soyutlama doğru yapılınca alttaki katmanın detayları yukarı sızmıyor.</strong> OSI’nin sana öğretmeye çalıştığı temel fikir de bu. Application katmanı altındakileri bilmiyor, sadece “veri akışı” görüyor.</p><h3>Bonus: TCP paketleri gerçekten “paket” mi?</h3><p>Sık karıştırılan bir nokta: TCP <strong>paket-oriented</strong> değil <strong>stream-oriented</strong>. Sen 100 byte’lık bir mesaj gönderiyorsun, ama TCP onu olduğu gibi paketlemiyor olabiliyor. 60 byte’ını bir paketle, 40 byte’ını başka bir paketle yollayabiliyor (<a href="https://en.wikipedia.org/wiki/Nagle%27s_algorithm">Nagle’s algorithm</a>). Veya senin 100 byte’ını başka 200 byte’lık mesajlarla birleştirip 300 byte’lık bir paket yapabiliyor.</p><p>Karşı tarafta uygulama read() çağırdığında <strong>da</strong> byte stream olarak okuyor. Yani sen write(sock, &quot;hello world&quot;, 11) deyip karşı tarafta read(sock, buf, 11) derseniz buf&#39;ta tam &quot;hello world&quot; olacağı <strong>garanti değil</strong>. Belki 5 byte&#39;ı (&quot;hello&quot;) geliyor, bir sonraki read() 6 byte (&quot; world&quot;) veriyor.</p><p>UDP ise tam tersi , <strong>datagram-oriented</strong>. Sen 100 byte yollarsan karşı taraf ya 100 byte alıyor ya hiç almıyor. Mesaj sınırları korunuyor. Ama sıralı garanti yok, kayıp garanti yok.</p><p>Bu fark higher-level protokolleri tasarlarken çok önemli. HTTP/1.1 TCP üstünde stream-oriented, body sınırını Content-Length header ile belli ediyor. WebSocket TCP üstünde ama mesaj sınırlarını kendi frame format&#39;ı ile koruyor. HTTP/3 ise UDP üstünde QUIC kullanıyor, paket sınırları korunuyor ama reliability ve şifreleme katmanlarını kendi içinde tutuyor.</p><h3>OSI Modeli neden hâlâ değerli (ve neden tam doğru değil)</h3><p>OSI 7-katmanlı model 1984&#39;te standardize edildi. O zamandan beri çok şey değişti:</p><ul><li>TLS hem L5 hem L6 işi yapıyor.</li><li>HTTP/2 ve HTTP/3 application layer’da çoklu stream sağlıyor (Session layer işi gibi).</li><li>QUIC L4 ve L5&#39;i birleştiriyor.</li><li>WebSocket HTTP’nin üstünde ama farklı bir protokol gibi davranıyor.</li></ul><p>Yine de OSI değerini kaybetmedi, çünkü:</p><ol><li><strong>Kategorize etmeyi öğretiyor.</strong> Bir problemle karşılaştığında “bu hangi katman?” diye sormak doğru sorulara götürüyor. Cable bağlı mı? L1. MAC adresi doğru mu? L2. IP route’lanıyor mu? L3. Port açık mı? L4. TLS sertifikası geçerli mi? L6. HTTP response geliyor mu? L7.</li><li><strong>Sorun ayırmayı kolaylaştırıyor.</strong> “Ping çalışıyor ama HTTPS çalışmıyor” → L3 OK, L4-L7 bir yerde sıkıntı var.</li><li><strong>Standart tartışmalarına dil veriyor.</strong> Protokol tasarlarken “biz L5&#39;te bir abstraction layer ekliyoruz” cümlesi bilenler için net.</li></ol><p>Modern bir geliştirici olarak OSI’yi referans bir harita olarak kullan, kanun olarak değil. Real-world stack’lerde katmanlar erimiş olabiliyor ama harita yine de yön gösteriyor.</p><h3>Tüm yolculuk, tek bir resimde</h3><p>Sana son bir özet vereyim. URL’ye Enter’a bastığın andan ekranda “Example Domain” yazısının belirdiği ana kadar:</p><pre>[Kullanıcı: enter tuşu]<br>       ↓<br>[Browser: URL parse, DNS lookup başlat]<br>       ↓<br>[OS: DNS cache miss → resolver → root → TLD → authoritative]<br>       ↓ (IP: 93.184.216.34, ~50ms)<br>[Browser: TCP socket aç → SYN, SYN-ACK, ACK]<br>       ↓ (~150ms, 1 RTT)<br>[Browser: TLS handshake → ClientHello, ServerHello+cert, Finished]<br>       ↓ (~150ms, 1 RTT)<br>[Browser: HTTP GET / yaz → TLS encrypt → TCP segment → IP packet → Ethernet frame]<br>       ↓ (kablo)<br>[Modem: NAT, modülasyon → ISP&#39;ye gönder]<br>       ↓ (fiber/coax)<br>[ISP backbone → BGP routing → IXP → uluslararası fiber → hedef ISP → veri merkezi]<br>       ↓<br>[Sunucu NIC → kernel → TCP/TLS decrypt → uygulama HTTP parse]<br>       ↓<br>[Sunucu: HTML üret, response oluştur]<br>       ↓<br>[Sunucu: HTTP response → TLS encrypt → TCP → IP → Ethernet]<br>       ↓ (ters yol, ~150ms)<br>[Senin NIC: paketleri al → DMA → ring buffer → interrupt → CPU]<br>       ↓<br>[Kernel: Ethernet sök → IP sök → TCP yeniden sırala → socket buffer&#39;a]<br>       ↓<br>[Browser: read() socket → TLS decrypt → plain HTTP response]<br>       ↓<br>[Browser: UTF-8 decode → string → HTML parser → DOM tree]<br>       ↓<br>[Browser: CSSOM, render tree, layout, paint, compositing]<br>       ↓<br>[GPU: pixel&#39;leri ekrana yaz]<br>       ↓<br>[Sen: &quot;Example Domain&quot; yazısını görüyorsun]</pre><p>Toplam: iyi bir bağlantıda yaklaşık 500–800 milisaniye. İlk ziyaretin için. İkinci ziyarette cache + keep-alive ile 50ms olabiliyor.</p><h3>Ne öğrendik</h3><p>Buraya kadar okuduysan, kafanda artık şu boşluklar olmamalı:</p><ul><li><strong>TCP socket okumak vs dosya okumak:</strong> aynı read(), aynı kernel API, sadece kaynak farklı. Soyutlamanın gücü.</li><li><strong>TLS ne zaman devreye giriyor:</strong> TCP el sıkışmadan sonra, HTTP’den önce. TCP “kanal aç” diyor, TLS “kanalı şifrele” diyor, HTTP “kanalda konuş” diyor.</li><li><strong>DNS hangi katmanda:</strong> Application layer (L7). UDP üstünde çalışıyor (L4). İşi: bir hostname’i IP’ye çevirmek.</li><li><strong>Modem ne yapıyor:</strong> dijital ↔ analog sinyal çevirimi + NAT (ev içi cihazları tek public IP’ye çevirme).</li><li><strong>BGP ve internet omurgası:</strong> AS’ler birbirine BGP ile yol gösteriyor, IXP’lerde fiziksel buluşuyorlar, uluslararası trafik denizaltı kablolarından geçiyor.</li><li><strong>HTTP versiyonları:</strong> /1.1 text ve sırayla, /2 binary ve multiplexed, /3 QUIC üstünde UDP, head-of-line blocking yok.</li><li><strong>TCP congestion control:</strong> slow start → AIMD → kayıp olunca yarıya in. Modern Linux CUBIC, Google BBR.</li><li><strong>Paket gerçekten paket mi:</strong> TCP stream-oriented, paketleme kernel’in işi, sen byte stream görüyorsun. UDP datagram-oriented, paket sınırları korunuyor.</li><li><strong>Byte’lar nasıl string oluyor:</strong> karakter kodlama (UTF-8 modern standart). Encoding bilinmeden byte’lar anlamsız.</li><li><strong>String’ler nasıl objelere dönüyor:</strong> parser string’i tokenize edip ağaç kuruyor.</li><li><strong>RAM ve CPU nasıl işliyor:</strong> memory hierarchy (register → L1 → L2 → L3 → RAM), stack vs heap, garbage collection. Cache hit/miss fark büyük.</li><li><strong>Browser security:</strong> SOP, CORS, mixed content, CSP , her sayfa yüklenirken sessizce çalışan koruma katmanları.</li><li><strong>OSI 7 vs TCP/IP 4:</strong> OSI öğretici, TCP/IP pratik. Modern internette katmanlar erimiş.</li></ul><p>Her bir adım kendi başına derin bir yazı olabilir , TLS sertifika doğrulaması, BGP routing detayları, garbage collection algoritmaları, V8&#39;in hidden classes, browser rendering pipeline, Linux io_uring vs epoll, QUIC vs TCP. İlerleyen yazılarda bazılarına gireriz. Şimdilik kafandaki büyük resim oturmuş olsun.</p><p>Bir HTTPS isteği “sadece bir istek” değil aslında. Onlarca uzman katmanın, on yıllar boyunca biriken standartların, milyarlarca cihazı uyumlu çalıştıran küresel bir orkestranın tek bir notası. Her açtığında sayfanın 800 milisaniyede yüklenmesi, sandığından çok daha büyük bir mucize.</p><p><em>Yazı işine yaradıysa, kafasında benzer boşluklar olan birine paylaş. Network ve sistem programlama dünyasında “tam oturmamış” hisseden çok kişi var. Çoğu sadece bu yolculuğu bir kere sırayla okumadığı için.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c725cfffb66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Moved My Dev Workflow to a $9/Month VPS]]></title>
            <link>https://medium.com/@akgunyunus482/why-i-moved-my-dev-workflow-to-a-9-month-vps-ef03c9f1ef08?source=rss-c74ca4be2b2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef03c9f1ef08</guid>
            <dc:creator><![CDATA[Yunus Emre Akgün]]></dc:creator>
            <pubDate>Sat, 27 Jun 2026 19:18:18 GMT</pubDate>
            <atom:updated>2026-06-27T21:03:32.997Z</atom:updated>
            <content:encoded><![CDATA[<p><em>And how I turned it into a secure chatbot that runs my tickets while I sleep.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cNXFN8YSbr9NyxVhWgDnZw.png" /></figure><p>A few months ago, my workflow had a quiet failure mode that I refused to admit was a real problem.</p><p>The ticket would land in Slack at 22:47. I was already in bed. The Mac was closed. By the time I opened it at 09:30 the next morning, the customer success person had already escalated it twice. The aggregator that triggered it had backed off. The window where I could have caught the failure pattern without it spreading was gone.</p><p>I could have blamed myself for not staying online. I could have set up “just one more” laptop-as-server hack with caffeinate and a USB charger taped to the wall. Instead I did the thing I had been postponing for a year: I rented a tiny VPS in Helsinki for $9 a month, and I moved the ticket-handling, triage, and execution layer of my dev workflow onto it. To be clear: my actual product still runs on Google Cloud. The VPS is where the ops layer around it lives — the thing that watches my services, triages incoming events, and runs ticket work while I&#39;m asleep.</p><p>This is a write-up of that move. What pushed me over the edge. What the architecture actually looks like. The trade-offs I live with. And — the part I find more interesting than the infra itself — how I turned a fleet of background scripts into something that talks to me like a chatbot but can’t do anything dangerous.</p><p>I’m writing it because the patterns generalize. If you’re a solo founder, a small-team lead, or someone running ops for a SaaS where you’re the only on-call human, the math here probably checks out for you too.</p><h3>Part 1 — Why I Resisted It For a Year</h3><p>For most of last year, my “ops layer” was my laptop. Concretely:</p><ul><li>Slack notifications were a Mac client running on my Desktop.</li><li>Ticket triage was me reading the message, opening my IDE, branching off main, doing the work.</li><li>Production monitoring was me opening Sentry, BigQuery, and a Temporal UI tab when something looked off.</li><li>After-hours? Nothing. The laptop was closed. The work waited.</li></ul><p>There was a reason I’d resisted moving any of this to a server. I’d seen too many “let me self-host my own internal tools” rabbit holes eat people’s weekends. I didn’t want to babysit a Kubernetes cluster. I didn’t want to maintain another Linux box. I didn’t want a separate set of secrets to rotate.</p><p>So I kept telling myself: <em>the laptop is enough. The volume is low. I sleep at night, that’s fine.</em></p><p>It was fine — until it wasn’t.</p><h3>The four pains that broke me</h3><p>In rough chronological order:</p><ol><li><strong>The 22:47 ticket.</strong> A failure pattern in one of our ingestion flows surfaced as a Slack ping at quarter to eleven at night. I saw it the next morning. By then it had compounded.</li><li><strong>The “phone-only” ticket.</strong> I was on the road for two days. A customer success person needed me to look at one specific workflow run. I couldn’t do it from my phone — SSH on a 6-inch screen is a punishment, not a workflow.</li><li><strong>The deploy that failed silently.</strong> A nightly deploy had a half-broken migration. I noticed it three days later when a metric looked off. There was no human watching, because <em>I</em> was the human, and I was asleep.</li><li><strong>The team question I couldn’t answer.</strong> Our sales lead asked, in a stand-up, “how many clients onboarded this week?” I had to open three dashboards and a notebook to answer. The answer was <em>in the data</em>, but it wasn’t <em>at the surface</em>.</li></ol><p>Each of these was small. None of them, individually, justified the work of moving anything off my laptop. But the pattern was clear: my workflow had a single point of failure, and that point was me being awake and in front of my Mac.</p><p>So I capitulated.</p><h3>Part 2 — Why a VPS, Not the Cloud-Provider Stack</h3><p>The moment I decided to do this, I had two real choices.</p><p><strong>Option A — A managed cloud stack.</strong> AWS or GCP or whatever, with managed services for everything. Lambda for webhooks. Fargate or Cloud Run for the workers. Managed Postgres. Managed Redis.</p><p><strong>Option B — A single Linux box at a budget provider.</strong> Hetzner, OVH, Vultr. SSH in. Install what I need. Own the whole thing.</p><p>The conventional wisdom says A. The conventional wisdom is wrong for my situation, and I think it’s wrong for most situations that look like mine. Let me show my work.</p><h3>Pros and cons, written out honestly</h3><p>Dimension Managed cloud (AWS/GCP) Single VPS (Hetzner) <strong>Cost at my scale</strong> $40–$200/month easy. NAT gateway alone is ~$30. $8.59/month flat. No surprise bills. <strong>Setup time</strong> Days. IAM, VPC, security groups, role bindings, ECR. An afternoon. Ubuntu, Docker, SSH, done. <strong>Operational surface</strong> Many small services to keep configured. One box. One SSH key. One Caddy. <strong>Scaling story</strong> Trivial — that’s the entire pitch. I’d have to grow to a real problem before it matters. <strong>Multi-tenancy</strong> Strong — accounts, IAM boundaries. Single tenant. That’s what I want here. <strong>Vendor lock-in</strong> High. None. The box is portable. <strong>Tool friendliness for “boring scripts”</strong> Painful. Lambda cold starts, layer packaging, IAM. Native. It’s just a Linux box. <strong>When something breaks at 02:00</strong> I have to remember which service is on which dashboard. One ssh and one journalctl.</p><p>The cost line is the easy one to point at, but it’s not the most important one. The most important line is the second-to-last: <strong>when something breaks at 02:00, I have to actually be able to debug it.</strong> A managed-cloud stack of a dozen tiny services is unfriendly to debug at 02:00. A single Linux box is one SSH and one journalctl -fu away from understanding what&#39;s happening.</p><p>For a single-developer ops layer, that matters more than scaling. I am not going to wake up one morning with a thousand-times traffic spike on my internal ticket bot. If I do, that’s a problem I will <em>enjoy</em> solving.</p><h3>Why Hetzner specifically</h3><p>I picked Hetzner CX33 (4 vCPU, 8 GB RAM, 80 GB SSD), Helsinki location. About <strong>$8.59 a month</strong>. The reasons, ranked:</p><ol><li><strong>Cost per vCPU is the lowest among reputable providers I trust with my data.</strong> AWS t3 small with 2 vCPU and 2 GB RAM is more expensive and weaker.</li><li><strong>EU jurisdiction.</strong> I’m a European company. Data residency questions are easier to answer when the box is physically in the EU.</li><li><strong>Their API and Cloud Console don’t insult my intelligence.</strong> I can resize, snapshot, attach volumes, and rotate SSH keys without re-learning the UI every six months.</li><li><strong>The network isn’t oversubscribed.</strong> I’ve been on lower-tier providers where you can feel the noisy-neighbor problem. Hetzner has never given me that feeling.</li></ol><p>I want to be clear: <strong>none of this is exotic.</strong> Hetzner is what it is. The choice isn’t where the value comes from. The value comes from what I built on top.</p><h3>Part 3 — The Architecture</h3><p>Here’s the map. I’ll narrate it after.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FaxfjOX6oV_USXIQb1L76g.png" /></figure><p>The box has five layers. From outside-in:</p><pre>1. NETWORK    →  Caddy (public HTTPS)  +  Tailscale (private mesh)<br>2. INBOUND    →  n8n workflow runner   +  webhook endpoints<br>3. BRAIN      →  Claude API for triage + Claude Code CLI for execution<br>4. EXECUTION  →  tmux sessions, git worktrees, headless Claude<br>5. SURFACE    →  Slack + Telegram bots + a small dashboard</pre><p>Each layer has exactly one job and a clean boundary with the layer above and below. I’ll go through them.</p><h3>Layer 1 — Network (Caddy + Tailscale)</h3><p>Two entry points to the box, with very different jobs.</p><p><strong>Caddy</strong> is the public HTTPS edge. It runs on ports 80/443. Auto-renews SSL via Let’s Encrypt. The only routes it serves are webhook receivers (/webhook/*) and a small read-only dashboard. Everything else is invisible from the public internet.</p><p><strong>Tailscale</strong> is the private mesh. It’s how I get into the box for any administrative work — SSH, the n8n editor UI, the worktree management endpoints. From my Mac, my iPad, my phone, Tailscale is the only path. No public SSH listener. No port-forwarded admin tool.</p><p>The reason I split it like this is operational, not religious. The webhook endpoints <em>have to</em> be public — Plane and Slack aren’t going to dial into my Tailnet. But everything I touch personally should <em>never</em> be public. The split makes the attack surface tiny: the only thing I expose to the world is a handful of authenticated webhook URLs behind Caddy, and those have HMAC signature validation on top.</p><h3>Layer 2 — Inbound (n8n + webhooks)</h3><p>n8n is the workflow runner that catches incoming events and routes them.</p><p>A typical n8n flow looks like this:</p><ol><li><strong>Plane sends a webhook</strong> when a ticket is created or updated.</li><li><strong>n8n verifies the HMAC signature</strong> against a shared secret pulled from 1Password.</li><li><strong>n8n calls Claude (Haiku) for triage</strong> — what’s this ticket about, who should look at it, is it urgent?</li><li><strong>n8n decides on a surface</strong> — Slack #tickets for normal, Telegram DM for urgent, Slack #business for sales-relevant.</li><li><strong>n8n posts a message</strong> with inline buttons: TAKE (take it), SKIP (not for me), DETAILS (give me details).</li></ol><p>The reason I use n8n instead of writing this in Node is that <strong>the wiring changes often.</strong> A new aggregator goes online and I want its failure pattern to trigger a different routing rule. A new team member wants their tickets to ping them on a separate channel. With n8n, those changes are 10 minutes in a UI. With code, they’re a PR, a deploy, and the inevitable hour of debugging why the new branch doesn’t see the env var.</p><blockquote><em>n8n’s main downside is the editor UI itself — it’s perfectly fine, but I’ve watched myself spend 20 minutes trying to remember how to wire two nodes I haven’t touched in a month. The fix is documentation, and I’ve been disciplined about that. Every workflow has a </em><em>## What this does sticky note next to its trigger.</em></blockquote><h3>Layer 3 — Brain (Claude)</h3><p>Two distinct uses of Claude on this box, with very different cost profiles.</p><p><strong>Claude Haiku</strong> runs the cheap, high-volume stuff — webhook triage. Given a ticket body and metadata, output a JSON object: {priority, surface, summary, suggested_action}. Each call is a few cents. There are dozens per day.</p><p><strong>Claude Code CLI</strong> runs the expensive, high-stakes stuff — actual ticket work. When I tap TAKE on a Slack message, a tmux session spawns, a git worktree is created off main, and Claude Code CLI is launched inside it with the ticket ID as context. It reads the ticket, reads the relevant code, proposes a diff, opens a PR.</p><p>The reason I split the two is <strong>token economics.</strong> If I sent every ticket to Sonnet or Opus for triage, my Anthropic bill would be five times what it is. Haiku is plenty for “what’s this and where should it go.” Opus is what you want for “now please understand this 8-file change and write the fix.”</p><h3>Layer 4 — Execution (tmux + worktrees)</h3><p>This is the part of the system that scared me the most before I built it, and that I’m proudest of now.</p><p>Each ticket gets its own <strong>git worktree</strong> — and most of my tickets span more than one of my repos (backend monorepo, admin panel, data ingestion service, frontend, ELT). A single slot can hold several parallel checkouts under ~/work/wt-1, ~/work/wt-2, up to slot 5. Each slot also gets its own <strong>Postgres database</strong> (a fast schema clone of prod) and its own <strong>Temporal namespace</strong>. So slot 2 working on TICKET-340 cannot accidentally write into slot 3&#39;s data, ever. Isolation is at the OS level, not at the application level.</p><p>Inside each worktree, the Claude Code CLI runs in a <strong>tmux session</strong> named after the ticket. I can tmux attach from my Mac (or my phone, via Tailscale + Termius) and see what it&#39;s doing, intervene, type in a clarification, anything. The session persists across SSH disconnects, which is the whole reason tmux exists.</p><p>When the work is done — PR opened, tests green, ready for review — the worktree gets cleaned up automatically. Slot freed. DB dropped. Temporal namespace deleted.</p><p>If the work <em>isn’t</em> done after 48 hours, the assistant pings me. If it isn’t done after 72 hours, the worktree is torn down regardless. This isn’t about being strict — it’s about the slot economy. Five slots is enough for me. If a stale worktree is squatting on slot 3, the next ticket can’t start.</p><h3>Layer 5 — Surface (Slack + Telegram + dashboard)</h3><p>This is the part the user sees. Three surfaces, three jobs.</p><p><strong>Slack </strong><strong>#tickets</strong> is the developer surface. Full technical detail. Raw IDs. Log snippets. Code paths. This is where I (the developer) live during work hours.</p><p><strong>Telegram bot</strong> is the mobile surface. <em>Urgent only.</em> High-priority incidents, blocking comments on tickets I own, anything where me being off Slack for an evening would actively cost something. It’s where I live during evenings and weekends.</p><p><strong>Slack </strong><strong>#business</strong> is the team surface. Same MCP backbone underneath, completely different prompt. The business-flavored /ask command answers things like <em>&quot;how many clients onboarded this week?&quot;</em> without mentioning a single Temporal run ID. Quiet on green — no message at all when nothing notable happened.</p><p>The three surfaces are routed by a small rule engine in n8n. A given event lands on <strong>exactly one</strong> surface. The dev surface never gets watered-down business language. The business surface never sees a workflow run ID. The mobile surface never gets non-urgent noise.</p><h3>Part 4 — How I Made It Feel Like a Chatbot</h3><p>The architecture above is mostly conventional. The interesting choice was higher up: <strong>how does this thing talk to me?</strong></p><p>The default answer is “it sends notifications.” I tried that. It became noise. I muted the channel.</p><p>The better answer, which took me a few iterations to land on, is: <strong>make it conversational and proactive at the same time.</strong></p><p>Concretely, that means three things.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r03FZFCKaVXSN0fJKP8txQ.gif" /></figure><h3>It speaks in buttons, not text walls</h3><p>Every actionable message is a short summary plus three to five buttons. TAKE, SKIP, DETAILS. Or ACK, SNOOZE 4h, ESCALATE. Tapping a button is a</p><p>complete interaction. I never have to type a command to triage a ticket from my phone.</p><p>The reason this matters is <strong>mobile.</strong> Typing slash commands on a phone keyboard is a hostile UX. Buttons are not. If the system is supposed to work for me when I’m away from the laptop, then mobile UX is the primary UX.</p><h3>It supports /ask for unstructured queries</h3><p>When buttons aren’t enough, I have a slash command. /ask which clients onboarded this week? In Slack #business, that returns a sales-friendly paragraph. In Slack #tickets, the same query returns a SQL-flavored answer with row counts and links. Different audience, same data, different surface.</p><p>Under the hood, /ask is a read-only fan-out across MCP servers — Temporal, BigQuery, the issues tracker, Slack search, GCS dumps. Read-only is non-negotiable; I&#39;ll come back to that in the security section.</p><h3>It speaks proactively, but only when the message is worth interrupting for</h3><p>This is the principle I had to learn the hard way. Periodic cron-and-post is noise. Proactive <em>context-aware</em> messages are valuable.</p><p>The pattern is what I call a “heartbeat” — a function that runs on a schedule, <strong>checks the state</strong>, and only posts if something interesting changed since the last time it ran. State is persisted to a small JSON file on the box. The dedup is the entire value.</p><p>Examples:</p><ul><li><em>“TICKET-340 has been blocked on the reporter for 48+ hours, want me to ping them?”</em> — only fires if it’s been blocked <em>and</em> I haven’t been asked yet.</li><li><em>“Aggregator X’s failure rate jumped 3× over the last hour.”</em> — only fires on the jump, not every hour the rate is elevated.</li><li><em>“Client Y onboarded today, all checks green.”</em> — fires once, on the day, in #business.</li></ul><p>The hard rule is: <strong>if a routine has produced zero useful messages in four weeks, it gets killed, not “tuned.”</strong> I am ruthless about that. Channels that get noisy get muted, and muted channels are dead channels.</p><h3>Part 5 — How I Made It Secure</h3><p>This is where I want to spend the most time, because it’s where I see most “let’s give the AI a chat surface” projects go off the rails.</p><p>The premise of the system is that an AI can talk in my Slack, read my codebase, spawn worktrees, see production data via read-only MCP connections, and produce PRs. That premise is fine. The premise that scares me is the implied next step: <em>and the AI can also act on production directly.</em> It cannot. I built hard rules into the system so that it cannot, even if it tried.</p><p>Here’s the layered model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OPuHldqJsUqkNyHuLaK5Qw.gif" /></figure><h3>Hard rule 1 — The assistant proposes, the human disposes</h3><p>No mutation of production state is ever performed by the assistant directly. Not database writes. Not Railway redeploys. Not kubectl apply. Not prod Temporal signals or cancellations or terminations. Not ELT repo commits.</p><p>When the assistant decides a production mutation is the right move, it <strong>drafts the action</strong>, posts it to Slack as an explicit approval card, and waits for me to tap a button. The card includes the exact command, the affected scope, the reason, and a one-line summary I can read from my lockscreen.</p><p>That’s the deal. Read freely. Write only with explicit human approval.</p><p>The reason this hard rule exists is not that I distrust the model. The reason is <strong>blast radius math.</strong> When the assistant is wrong about a read, I see a wrong answer and I correct it. When the assistant is wrong about a write, something in production is in a wrong state. The cost of these two failure modes is not symmetric.</p><h3>Hard rule 2 — Secrets are referenced, not stored</h3><p>There is no .env file with raw values on the box. Every secret is a 1Password reference of the form {{ op://MyVault/some-item/some-field }}. At boot, op inject resolves them into the process env, and the process holds the resolved values in memory only.</p><p>The 1Password service account that does the resolution is <strong>read-only</strong>. It can read the vaults it’s been granted access to. It cannot write. It cannot create new items. It cannot rotate. If the token leaks, the attacker gets a read of the vaults, not a takeover of them.</p><p>We just removed a 20-day token leak in a separate part of the stack — a script that put a setup token on argv instead of in the env. The fix was to ban that pattern outright. No tool on the box puts secrets on argv. Periodic scans of /proc/*/cmdline look for token-shaped strings. Zero hits is the SLA.</p><h3>Hard rule 3 — Webhooks have signatures, ports have firewalls</h3><p>Every webhook endpoint validates an HMAC-SHA256 signature against the secret in 1Password. A webhook that doesn’t pass the signature check gets a 401 and never enters the n8n flow. Replay protection is via a short TTL on the signature timestamp.</p><p>UFW is on. The only ports open to the public are 22 (key-only SSH, no password auth, fail2ban watching for brute-force), 80 (Caddy redirect), and 443 (Caddy HTTPS). Port 5678 (the n8n editor UI) is bound to the Tailscale interface only — there is no public route to it.</p><h3>Hard rule 4 — The assistant runs unprivileged</h3><p>The assistant runs as a non-root user. It has access to a whitelist of shell scripts it’s allowed to invoke — start-ticket.sh, stop-ticket.sh, ask-human.sh, and a few more. It cannot invoke arbitrary commands. The whitelist is enforced by a small Node &quot;command runner&quot; service that is the only process the assistant talks to for shell execution.</p><p>The whitelist matters because it makes a <em>whole class</em> of “ignore previous instructions, now rm -rf ~&quot; attempts impossible. Even if the model is jailbroken, the only thing it can run is a whitelisted script with a whitelisted argument shape.</p><h3>Hard rule 5 — Rate limits and dedup</h3><p>Each ticket has a 5-minute cooldown. If the same Plane webhook fires twice in five minutes (a real thing — Plane retries on 5xx), only the first one results in a Slack post.</p><p>Each heartbeat persists its last-posted-event to a small state JSON. A heartbeat that has already told me about X today will not tell me again, even if the underlying condition is still true.</p><p>The combined effect of these two rules is: <strong>no spam.</strong> The assistant’s currency is my attention, and it is required to be cheap with it.</p><h3>What I deliberately did NOT do</h3><ul><li><strong>No self-modifying skills.</strong> The assistant cannot rewrite its own SKILL prompts at runtime. If the prompt is wrong, I edit it on the box, restart the service, done. Self-modifying agents make rollback impossible.</li><li><strong>No autonomous browsing of the public web.</strong> Browser automation lives in a separate SDK with its own boundaries — not in the assistant. The assistant cannot decide to go fetch a webpage on its own.</li><li><strong>No persistent memory of users across sessions.</strong> The state JSON is dedup state, not user-profile state. There is no creeping personalization layer.</li></ul><p>These are deliberate self-imposed limits. I don’t want them to relax. They are the reason I sleep at night.</p><h3>Part 6 — What the System Actually Does Now</h3><p>This is what a normal day looks like, six months in.</p><p><strong>Morning.</strong> I open Slack on my phone. There’s a short summary message from the assistant: 3 new tickets overnight (one urgent, two routine), 1 PR awaiting review, 0 unexpected failure patterns. I tap TAKE on the urgent one before I&#39;m out of bed. By the time I&#39;m at my Mac, a worktree is spun up and the first investigation pass is done.</p><p><strong>During the day.</strong> Tickets come in, the assistant triages them, I tap a button to pull the ones I want, ignore the ones I don’t. Three of them I just push to “investigate later” with SNOOZE 4h. One I /ask about because the description was sparse — the assistant fans out across the issue tracker, the related Slack threads, and the relevant Temporal workflows, and gives me a paragraph of context I would have spent an hour collecting myself.</p><p><strong>Evening.</strong> I close the laptop. The box keeps running. If something urgent happens — a failure rate spike, a blocking comment on a ticket I own, an onboarding flow that broke during a client trial — the Telegram bot pings me. One message, one button, I can ack from my couch. Everything else waits until morning.</p><p><strong>Weekends.</strong> Mostly silent. The #business channel posts a single weekly summary on Monday morning. The #tickets channel is muted until I un-mute it. The Telegram bot is the only thing that can reach me, and it&#39;s contractually obligated to be quiet unless something is genuinely on fire.</p><p>That’s the system. It’s not glamorous. It hasn’t doubled my output, because output was never the bottleneck. What it has done is shrink the <em>latency</em> between something happening and me being able to act on it, <strong>without requiring me to be online to receive it.</strong></p><p>That latency reduction is the entire product.</p><h3>Part 7 — The Trade-Offs I Live With</h3><p>Honest list.</p><h3>What I gained</h3><ul><li><strong>Sleep.</strong> Genuinely. I wake up to triaged context, not raw firehoses.</li><li><strong>Mobile parity.</strong> I can do 80% of my ticket-triage work from a phone. Buttons, not commands.</li><li><strong>Always-on production observability</strong> for the patterns I care about. No more “noticed three days later.”</li><li><strong>Audience separation.</strong> The sales lead gets answers in their language. I get answers in mine. Same backbone.</li></ul><h3>What I gave up</h3><ul><li><strong>The ability to ignore infra entirely.</strong> I now have a Linux box to maintain. I have to apply upgrades. I have to think about backups. When a disk fills, <em>I</em> fix it.</li><li><strong>A one-Mac workflow.</strong> The state of the system is no longer locally inspectable by opening a tab. Now it’s ssh + journalctl + dashboard. That&#39;s a small friction tax.</li><li><strong>A flat Anthropic bill.</strong> Adding Claude into the inbound loop costs real money. I budget it. Routines that exceed their share get their cadence reduced.</li></ul><h3>Pitfalls I hit on the way in</h3><p>A few things I would warn anyone trying this about.</p><p><strong>Don’t put your setup token on </strong><strong>argv.</strong> I leaked one for 20 days because of a script that did claude setup-token $TOKEN. Periodic /proc/*/cmdline scans found it. Now the rule is: secrets only via env, never via argv. Ever.</p><p><strong>Don’t let n8n become a dumping ground.</strong> It is irresistible to wire up “just one more” workflow until you have 40 of them, none of which you can remember the purpose of. Every workflow gets a sticky note at its trigger. Workflows that produce zero useful output in four weeks get deleted, not muted.</p><p><strong>Don’t let routines run as root.</strong> Even if it’s “just for this one thing.” I run everything as a app user. Root is for apt upgrade and nothing else.</p><p><strong>Don’t skip the dedup state.</strong> A heartbeat without dedup state is a spam machine. The first version of my failure-pattern detector posted the same warning 11 times in 90 minutes. I had to mute the channel. Adding a JSON state file with a last_posted_at per pattern fixed it permanently.</p><h3>Part 8 — Would I Recommend This to You?</h3><p>If you’re a solo founder, a small-team tech lead, or the de-facto on-call human for a SaaS — yes. The math is too good to ignore. A box at Hetzner is cheaper than a single AWS service, and the result feels like having a second person on the team who is patient, fast, and never gets tired.</p><p>If you’re at a bigger company with a real SRE team and existing infra — probably no. You have other answers to these problems, and they’re better.</p><p>If you’re somewhere in between — you’re the interesting case. Try one piece. Move <em>only</em> your inbound webhook triage onto a $9 VPS for a month. See how it feels. The full architecture I described is the result of six months of iteration; you don’t have to land there on day one.</p><h3>What’s Next on the Stack</h3><p>A few things I’m still building, which will probably be future posts:</p><ul><li><strong>Persistent assistant state</strong> — right now state is per-routine. I want a shared store so heartbeats can dedupe across surfaces.</li><li><strong>A real budget envelope</strong> — the kind that shows me, in Slack, how much I’ve spent this month and where, and that auto-throttles the chattiest routines when I’m close to the cap.</li><li><strong>A second human on the on-call rotation</strong> — the Telegram bot is, today, just me. The right next step is letting it page a backup human if I haven’t acked in N minutes.</li></ul><p>If any of those would be interesting to read about in detail, tell me. The order I write them in is mostly determined by what people ask about.</p><p><em>If this was useful, the most useful thing you can do is share it with the one person in your network who is, right now, running an ops layer out of their closed laptop. They’re the audience.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef03c9f1ef08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Ship 10 Projects as a Single Developer]]></title>
            <link>https://medium.com/@akgunyunus482/how-i-ship-10-projects-as-a-single-developer-6a806e9d512f?source=rss-c74ca4be2b2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a806e9d512f</guid>
            <dc:creator><![CDATA[Yunus Emre Akgün]]></dc:creator>
            <pubDate>Wed, 24 Jun 2026 21:30:30 GMT</pubDate>
            <atom:updated>2026-06-25T07:09:18.862Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The 4-layer AI stack — and the wiring that holds it together.</em></p><p>I run 10 projects in parallel — about half are work, half are personal. iOS apps, internal tools, side experiments. Each has its own setup: staging, prod, paywall (if it sells), ad networks (if it ships), store metadata, review queue. I do all of this alone, mostly in evenings and weekends.</p><p>A year ago, this would have crushed me. The context-switch tax was brutal. Today, it doesn’t — because I stopped relying on memory and built a system that does the remembering for me.</p><p>The system has 4 layers. I’ll go through each one — what it does, why I chose it, the trade-offs I live with. Then I’ll show you the wiring that holds them together, which is the part that actually matters.</p><h3>The 4 Layers</h3><ol><li><strong>Memory</strong> — Obsidian vault for hot context</li><li><strong>Secrets</strong> — 1Password + op CLI for credentials</li><li><strong>Intelligence</strong> — Claude + Codex + Gemini, routed via CLAUDE.md</li><li><strong>Automation</strong> — Browser + Platform MCPs for direct writes</li></ol><p>All four route through one orchestrator (Claude Code) and one config file (CLAUDE.md). That&#39;s the moat. Tools are commodity; the routing isn&#39;t.</p><h3>Layer 1 — Memory (Obsidian Vault)</h3><p>Everything lives in a local <a href="https://obsidian.md/">Obsidian</a> vault at ~/second-brain. Plain markdown. No proprietary database. No plugins doing heavy lifting.</p><p><strong>Obsidian Sync (paid, $10/month)</strong> mirrors the vault across every device I use — main Mac, secondary Mac, iPhone, iPad. That’s the trick that makes the system actually portable: I switch devices mid-thought without losing context. Claude on the laptop and Claude on the iPad both read the same hot.md.</p><p>The structure that matters:</p><ul><li>hot.md — the last session&#39;s context. What I worked on, what&#39;s pending, what&#39;s blocked.</li><li>orient.md — active priorities across all projects.</li><li>memory/*.md — one markdown file per atomic memory entry (topics like feedback_revenuecat_pricing_pattern or user_phone).</li><li>projects/&lt;project&gt;/tasks.md — per-project task list.</li></ul><p><strong>Why this works with AI:</strong> Claude reads hot.md and orient.md on every session boot. The rule lives in my CLAUDE.md. I never have to brief it. <em>&quot;pick up where we left off&quot;</em> — Claude reads, knows the state, suggests the next move.</p><p><strong>Trade-off:</strong> discipline. The end-of-session ritual must update the vault. Skip it once, the vault rots. Skip it twice and it becomes useless.</p><h3>Layer 2 — Secrets (1Password + op CLI)</h3><p>Every API key, SDK token, certificate, and database credential lives in <a href="https://1password.com/">1Password</a>. Nothing in .env files. Nothing in source control.</p><p>Instead, env templates in the repo with reference syntax:</p><pre>SENTRY_DSN={{ op://Default/Sentry/dsn }}<br>RC_API_KEY={{ op://Default/RevenueCat/api_key }}<br>APPSFLYER_DEV_KEY={{ op://Default/AppsFlyer/dev_key }}</pre><p>Then one command hydrates everything:</p><pre>op inject -i .env.staging.tpl -o .env.staging</pre><p><strong>Why this matters with AI in the loop:</strong> Claude reads my env template files all the time. If those had raw values, every secret would end up in the LLM’s context window. With op:// references, Claude sees the shape but not the values.</p><p><strong>Trade-off:</strong> OP_SERVICE_ACCOUNT_TOKEN scoping is fiddly at first. Get it wrong and you hit vault not found until you re-issue. First setup takes 30 minutes of trial-and-error.</p><h3>Layer 3 — Intelligence (Three LLMs, One Routing Rule)</h3><p>Three LLMs cooperate as one brain — but only one of them ever thinks about your task as a whole.</p><p><a href="https://www.anthropic.com/claude-code">Claude Code</a> is the orchestrator. Every task starts here. Why Claude as primary: the reasoning is deeper, the MCP ecosystem is more mature (for most platforms I work with — subscriptions, analytics, device automation — an integration already exists and works in production), the skills system lets me invoke domain skills contextually, and agent teams give me parallel subagents when I need cross-layer concurrency.</p><p>But Claude (Opus) tokens are expensive. So the delegation router in CLAUDE.md keeps the bill manageable:</p><pre>Is the work mechanical? (format, rename, scaffold)<br>  → YES → Codex (mcp__codex__codex)</pre><pre>Need large context? (monorepo, impact analysis)<br>  → YES → Gemini (mcp__gemini__gemini_chat)</pre><pre>Deep reasoning / decision / MCP / vault / iteration?<br>  → Keep in Claude</pre><p>I originally write my CLAUDE.md in Turkish — translated above for clarity. The shape is what matters, not the language.</p><p>The decision is pre-written, not per-session. That’s the whole game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*lM1Hoi1jG3DnH7WQ6Q25Tg.png" /></figure><p><a href="https://openai.com/index/openai-codex"><strong>Codex</strong></a> handles mechanical work — format conversions, bulk renames, boilerplate scaffolds, multi-locale string translations. Half the token cost of Claude for deterministic work.</p><p><a href="https://gemini.google.com/"><strong>Gemini</strong></a> handles large-context sweeps — monorepo audits, impact analysis, <em>“what does this change break across 50 files.”</em> The 1M+ token context window swallows things that would crush Claude.</p><p>Together, the routing rule means Claude only thinks when judgment is required. Codex and Gemini absorb the rest.</p><p><strong>Trade-offs:</strong> Claude’s Opus tokens add up without delegation discipline. Codex is bad at judgment calls — don’t ask it <em>“should I refactor this?”</em> Gemini reliability is uneven — I hit an eligibility error mid-flight last week.</p><h3>Layer 4 — Automation (Browser + Platform MCPs)</h3><p>This is the layer worth detailing. It’s the most important one for shipping speed.</p><h3>Browser MCP (claude-in-chrome)</h3><p>claude-in-chrome gives Claude a real Chrome browser. Not a headless one — <em>my</em> browser, with <em>my</em> logins. It can navigate to any URL, read accessibility trees (better than DOM scraping), click, type, scroll, screenshot, and execute arbitrary JavaScript in the page context.</p><p>Real use cases this week:</p><ul><li><a href="https://www.revenuecat.com/"><strong>RevenueCat</strong></a><strong> paywall publish</strong> — RC’s API doesn’t have a “publish paywall” endpoint. Browser MCP opened the dashboard, clicked Publish, handled the race condition where it said <em>“another user changed this”</em> (refresh + retry, twice).</li><li><a href="https://developer.apple.com/app-store-connect/"><strong>App Store Connect</strong></a><strong> screenshot uploads</strong> — ASC has a permission-locked screenshot uploader. Fastlane covers most of it, but for inflight-version edits, I drove the dashboard directly.</li><li><strong>Meta Business Suite setup</strong> — 24-hour Facebook account warming, business portfolio creation, ad account binding, <a href="https://www.appsflyer.com/">AppsFlyer</a> integration activation — all in one flow, no manual context switch. ~45 minutes that would have been hours.</li><li><strong>TikTok For Business signup</strong> — Generated App ID, configured AppsFlyer Advanced SRN integration. Browser drove the entire signup flow.</li></ul><p>The pattern: anywhere a vendor’s API is incomplete <em>or</em> I’d otherwise click through a dashboard, Browser MCP closes the gap.</p><p><strong>Trade-off:</strong> pages with alert/dialog popups freeze the session. If I trigger a JavaScript confirm() dialog, the rest of the batch hangs. I avoid clicking anything that could open a confirm dialog. Captcha-protected flows still require me — Browser MCP refuses to bypass detection on purpose.</p><h3>Platform MCPs</h3><p>Beyond browser automation, native API MCPs close gaps where dashboards would be slow:</p><ul><li>For iOS subscription apps, an MCP creates IAPs, manages subscriptions, and submits for review without opening App Store Connect. Last week I created a forever lifetime IAP after Apple reserved my old productId for ~1 year — the kind of unsexy detail you only learn by shipping.</li><li>For paywall management, the SDK and dashboard are programmatically accessible. I create offerings and paywall configs from Claude (publishing them still needs Browser MCP).</li><li>For backend config, I push <a href="https://firebase.google.com/">Firebase</a> Remote Config values and read Crashlytics issues without opening the console.</li><li>For analytics-heavy products, adding a tracking event in code also creates it in the taxonomy in the same conversation.</li><li>For E2E testing, a device automation MCP drives an iPhone simulator or real device for test runs.</li></ul><p>The combined effect: I haven’t manually opened App Store Connect in 6 weeks except to approve things Apple blocked from API access.</p><p><strong>Trade-off:</strong> coverage is incomplete. Apple’s oneTimeProducts write endpoint isn&#39;t in the public REST API, so I still fall back to Browser MCP for lifetime IAP creation. Every MCP has rough edges.</p><h3>The Wiring</h3><p>Four tools is a list. Routing is the system.</p><p>Six layers were the first attempt. Then I realized three of them — Claude, Codex, Gemini — were doing the same thing (thinking) just at different price/depth points. Collapsing them into one <strong>Intelligence</strong> layer with a delegation router made the whole stack snap into place.</p><p>Now there are four: memory holds state, secrets hold credentials, intelligence makes decisions, automation pushes to the world. Each routes through Claude Code. Each rule pre-written in CLAUDE.md.</p><h3>A Real Morning</h3><p>Today I opened a session and typed: <em>pick up where we left off.</em></p><p>Claude read hot.md and came back with:</p><blockquote><em>First project — Build 7 in Apple review, 24–48h.<br> Second project — Meta integration waiting on store approval.<br> Third project — pricing retry ready.<br> Where do you want to start?</em></blockquote><p>Zero brief. Zero <em>“let me catch you up.”</em> 30 seconds in, we were on the actual work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ZjH5B5Rgk48hvPRdwPotMA.png" /></figure><h3>What This Costs</h3><p>The Stripe bill: about $200/month in LLM tokens — mostly Opus, a bit of Sonnet, occasional Haiku for routine stuff. Add $10/month for Obsidian Sync. Everything else (1Password, the MCP fleet, agent teams, Chrome) is either free, open-source, or already in a subscription I’d pay for anyway. For 10 projects that ship, that’s a rounding error.</p><p>The real cost isn’t on the credit card. It’s the <strong>discipline tax</strong>. Every layer demands a small habit. Every session has to end with a vault update. Every new env file has to flow through op inject before you touch it. Every routing rule has to live in CLAUDE.md before the situation comes up — not after.</p><p>Miss one of those and the stack starts to drift. Not loudly. Slowly. A week without vault updates and Claude starts giving generic answers. A month without rotation discipline and secrets end up in random files. The system is durable. The habits aren’t. That’s the actual cost.</p><p>The other cost nobody mentions: time-to-stable. This took about three months of evening tinkering to land on. The Obsidian schema went through four rewrites. The MCP wiring took six weeks to stop breaking on Friday afternoons. The delegation router went through five iterations before I stopped second-guessing every call. If you ship solo across multiple projects, this investment pays back fast. If you have a team of five and unlimited eng hours, it’s probably over-engineering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r5gIm9JBqB75KagUn-YAhA.png" /></figure><h3>What’s Next</h3><p>I’m going to deep-dive each layer in follow-up posts:</p><ul><li>Vault setup ritual + memory entry patterns</li><li>op CLI patterns for multi-app management</li><li>The full MCP wiring playbook (with my exact mcp.json)</li><li>Delegation router gotchas I learned the hard way</li><li>Scheduled jobs + auto error detection — making deployment failures, email bounces, and prod errors surface themselves before users do</li></ul><p><strong>Follow if you build solo with AI.</strong> The unsexy parts are where the leverage compounds.</p><p><em>Yunus Emre Akgün</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a806e9d512f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>