Tüm uzmanlıklarTeknoloji · İş görüşmesi

Sistem tasarımı

System design mülakatı bir sohbettir. Anadili İngilizce olmayanlar için zorluk, aynı anda hem düşünüp hem konuşurken net bir yapıyı korumaktır.

Kelimeler → ifadeler → cümleler → konuşma

SpeakRole’i dene ↗
İş görüşmesiSistem tasarımı
V

Design a URL shortener. Where are the bottlenecks?

0:18
Mülakat sorusu

Sistem tasarımı

Tek bir doğru tasarım yoktur. Mülakatçılar, problemi nasıl netleştirdiğinizi, rakamlar üzerinden nasıl akıl yürüttüğünüzü ve ödünleşimleri (trade-off) nasıl anlattığınızı değerlendirir. Net bir sırayla konuşmak, çok sayıda teknoloji saymaktan daha önemlidir.

Sabit bir yapı kullanın ve bunu yüksek sesle söyleyin: gereksinimler, kaba rakamlar, basit bir tasarım, ardından darboğazlar ve ölçekleme. "Now I will estimate the load" dediğinizde mülakatçı sizi takip edebilir, siz de düşünmek için bir an kazanırsınız.

  • ✓Kelimeler → ifadeler → cümleler → konuşma
  • ✓Yanıtın anlamı
  • ✓Dil

Sık sorulan mülakat soruları ve örnek cevaplar

Design a URL shortener. Where are the bottlenecks?

Bir URL kısaltıcı tasarlayın. Darboğazlar nerede?

Mülakatçı ne duymak ister. Önce netleştirici sorular, sonra basit bir tasarım, ardından asıl darboğaz: okumalar ve benzersiz kodlar.

Yüksek sesle çalışmak için İngilizce örnek cevap

First I clarify the requirements: how many new links per day, how many redirects, and whether links expire. Let us say 100 million new links a month and a hundred times more reads. The design is simple: an API to create a link, a service that generates a unique short code, a database that maps the code to the URL, and a redirect service with a cache. Reads are the main load, so I put a cache in front of the database and use a store that scales for key-value access. The hard part is generating unique codes without collisions, for example with ranges of a counter given to each server, and base-62 encoding. I would also add rate limiting against abuse.

How do you structure your answer in a system design interview?

System design mülakatında cevabınızı nasıl yapılandırırsınız?

Mülakatçı ne duymak ister. Yüksek sesle söylediğiniz, tekrarlanabilir bir sıra.

Yüksek sesle çalışmak için İngilizce örnek cevap

I follow the same order every time. First, I ask about requirements, both functional and non-functional, like latency and availability. Second, I make a rough estimate of the traffic and the storage, so I know the scale. Third, I draw a simple high-level design with the main components and the data model. Then I go deeper into the part that matters most, usually the data store or the bottleneck. At the end I discuss failure, monitoring and how the system can grow. I say each step aloud, so the interviewer can follow my thinking and guide me.

How would you use a cache, and what are the risks?

Cache'i nasıl kullanırsınız ve riskleri nelerdir?

Mülakatçı ne duymak ister. Adı konmuş bir kalıp, geçerlilik süresi ve en az iki gerçek risk.

Yüksek sesle çalışmak için İngilizce örnek cevap

I would use a cache for data that is read often and changes rarely. The most common pattern is cache-aside: the application checks the cache first, and on a miss it reads from the database and saves the result with a time to live. The risks are stale data, a cache stampede when a popular key expires and many requests hit the database together, and an unclear invalidation strategy. To reduce these risks, I choose a sensible expiry time, add a small random variation to it, and decide how much stale data the business accepts.

How do you scale a database?

Bir veritabanını nasıl ölçeklersiniz?

Mülakatçı ne duymak ister. Mantıklı bir sıra: önce basit adımlar, sonra replika'lar, sonra maliyetiyle birlikte sharding.

Yüksek sesle çalışmak için İngilizce örnek cevap

I start with the simplest options: better indexes, query tuning and a bigger machine. Then I add read replicas, which help when reads dominate, but replicas can lag behind the primary. When writes or data size become the problem, I use sharding: splitting data by a key, such as a user ID, across several databases. Sharding brings complexity. Queries across shards are hard, and moving data between shards is painful. So I pick the shard key carefully and delay sharding until it is really needed.

How do you talk about trade-offs and consistency?

Ödünleşimlerden ve tutarlılıktan nasıl söz edersiniz?

Mülakatçı ne duymak ister. Her kararın maliyetiyle birlikte söylenmesi ve ürüne bağlanması.

Yüksek sesle çalışmak için İngilizce örnek cevap

I try to say each decision together with its cost. For example, I choose eventual consistency for a news feed, because it gives lower latency and higher availability, and users can accept a delay of a few seconds. For payments, I choose strong consistency, because correctness is more important than speed. When a network partition happens, a distributed system must choose between consistency and availability, and I explain which one the business prefers for each part of the system. This shows that I think about the product, not only about technology.

Anahtar terimler nasıl telaffuz edilir

scalability
skey-lı-BİL-i-ti
sharding
ŞAR-ding
cache
keş
availability
ı-vey-lı-BİL-i-ti
latency
LEY-tın-si
bottleneck
BOT-ıl-nek

Cevap vermek için kullanışlı kalıplar

  • Let me clarify the requirements first.Önce gereksinimleri netleştireyim.
  • Can I assume that…?… olduğunu varsayabilir miyim?
  • Let me do a rough estimate.Kabaca bir tahmin yapayım.
  • The main bottleneck here is…Buradaki asıl darboğaz…
  • The trade-off is…, so I would choose…Ödünleşim (trade-off) şu:…, bu yüzden … seçerdim.
  • To summarise the design,Tasarımı özetlemek gerekirse,
  • If we have time, I would go deeper into…Vaktimiz olursa … konusunda daha derine inerdim.

Sık yapılan hatalar

  • Soru sormadan çizmeye başlamak. İlk dakikaları gereksinimlere ayırın.
  • Düşünürken susmak. "I need a moment to think about the data model" deyin; böylece mülakatçı çalıştığınızı bilir.
  • Gerekçesiz çok sayıda teknoloji saymak. Birini seçin ve neden uygun olduğunu açıklayın.
  • Arızaları ve izlemeyi (monitoring) görmezden gelmek. Bir düğüm (node) çöktüğünde ne olduğuna dair tek bir cümle deneyim gösterir.

Sıkça sorulan sorular

System design mülakatında rakamlara ihtiyaç var mı?

Evet, kaba rakamlara. Bunları yüksek sesle söyleyin: saniyedeki istek sayısı, yıllık depolama. Kesin olmaları gerekmez ama ölçeği düşündüğünüzü gösterirler.

Mülakatçının andığı bir teknolojiyi bilmiyorsam ne yapmalıyım?

Bunu söyleyin, sonra ihtiyaç duyduğunuz özelliklerden yola çıkarak akıl yürütün: "I have not used it, but if it is a key-value store with low latency, I would use it for…"

Ara vermeden ne kadar konuşmalıyım?

Bir iki dakikadan fazla değil. Doğal yerlerde durun ve sorun: "Does this direction make sense to you?"

Bir cevabı okumak ile onu söylemek aynı şey değildir. Her soruyu yüksek sesle çalışın, ardından kendi cevabınızın anlamını ve dilini karşılaştırın.

SpeakRole’i dene ↗

Bu alandaki diğer konular