← All posts
behind the scenesinfrastructure

Running disdroc on hardware I own, and updating it without kicking you out

disdroc does not run in a rented cloud. It runs on hardware I own. Here is what that means, what it does not mean, and how an update can go out in the middle of your call.

nadirisimOctober 4, 20262 min read

One person, owned hardware

disdroc is built and run by one developer, not a company, with no investors. The service runs on hardware I own, not on a rented cloud. Disdroc AI runs on my hardware too, instead of calling an outside AI service.

The stack is deliberately small and boring: Node.js and Express, Socket.IO for real-time chat, WebRTC for voice and video, SQLite for storage and a plain JavaScript front end. A project run by one person has to stay something one person can understand and fix.

What it does not mean

Owning the hardware does not mean disdroc has no outside connections. Cloudflare delivers the website and processes connection data. Public pages load fonts from Google Fonts. Optional features such as GIF search, embedded video, music and push notifications involve other providers. The trust page lists them.

It also means hardware problems are mine to fix. When something is wrong, the status page is the first place to check.

Updates without downtime

disdroc ships often. On September 13 alone there were eleven releases. If every update meant a few minutes offline, people would be kicked out of calls all day. So two copies of the server run at all times:

  1. The new version starts in the copy that is not serving anyone.
  2. It has to pass a health check. If it does not become healthy in time, nothing switches over, and you never see the broken version.
  3. Once it is healthy, new connections go to the new copy.
  4. Then everyone still on the old copy is moved over together.

Why "together" matters

Chat rooms and calls live inside one running copy of the server. If half the people in a call stayed on the old copy and the rest reconnected to the new one, the call would quietly split in two. Each side would think the other had dropped. So the move happens in one coordinated step.

"Without downtime" is not "without any trace".

During that step your app reconnects. Usually it is quick enough that you will not notice. Sometimes you might see a short reconnect.

Tek kişi, kendi donanımı

disdroc'u bir şirket değil, tek bir geliştirici yapıyor ve işletiyor; yatırımcısı yok. Hizmet kiralık bir bulutta değil, benim sahip olduğum donanımda çalışıyor. Disdroc AI da dış bir yapay zekâ hizmetini çağırmak yerine benim donanımımda çalışıyor.

Kullanılan teknolojiler bilinçli olarak küçük ve sıkıcı: Node.js ve Express, gerçek zamanlı sohbet için Socket.IO, ses ve görüntü için WebRTC, depolama için SQLite ve düz JavaScript bir arayüz. Tek kişinin yürüttüğü bir proje, tek kişinin anlayıp düzeltebileceği bir şey olarak kalmak zorunda.

Ne anlama gelmiyor

Donanımın sahibi olmak, disdroc'un hiç dış bağlantısı olmadığı anlamına gelmiyor. Siteyi Cloudflare ulaştırıyor ve bağlantı verilerini işliyor. Herkese açık sayfalar yazı tiplerini Google Fonts'tan yüklüyor. GIF arama, gömülü video, müzik ve anlık bildirimler gibi isteğe bağlı özelliklerde başka sağlayıcılar da var. Listesi güven sayfasında.

Bu ayrıca donanım sorunlarını benim çözmem gerektiği anlamına geliyor. Bir şeyler ters gittiğinde ilk bakılacak yer durum sayfası.

Kesintisiz güncellemeler

disdroc sık güncelleniyor. Yalnızca 13 Eylül'de on bir sürüm çıktı. Her güncelleme birkaç dakikalık kesinti demek olsaydı, insanlar gün boyu aramalardan atılırdı. Bu yüzden sunucunun iki kopyası her zaman çalışıyor:

  1. Yeni sürüm, o an kimseye hizmet vermeyen kopyada başlar.
  2. Bir sağlık kontrolünden geçmesi gerekir. Zamanında sağlıklı hâle gelmezse hiçbir şey değişmez ve bozuk sürümü hiç görmezsin.
  3. Sağlıklı olduğunda yeni bağlantılar yeni kopyaya gider.
  4. Sonra hâlâ eski kopyada olan herkes birlikte taşınır.

"Birlikte" neden önemli

Sohbet odaları ve aramalar sunucunun çalışan tek bir kopyasının içinde yaşar. Bir aramadaki insanların yarısı eski kopyada kalsa, diğerleri yenisine bağlansa, arama sessizce ikiye bölünürdü. Her iki taraf da diğerinin düştüğünü sanırdı. Bu yüzden taşıma tek, koordineli bir adımda yapılıyor.

"Kesintisiz", "hiç iz bırakmadan" demek değil.

O adım sırasında uygulaman yeniden bağlanır. Genelde fark etmeyeceğin kadar hızlıdır. Bazen kısa bir yeniden bağlanma görebilirsin.

Open disdroc Who we are Service status