Library / Blogs
Kakao Blog (Korean)
The engineering and technology blog of Kakao: posts on how it designs, builds and scales its systems. Written in Korean.
By Kakao engineers · Kakao · Added 2026-10-12
All content belongs to Kakao engineers / Kakao. We only link to it and give credit. Report a problem
Learn this article
About 37 min left. Your work is saved as you go.
What you are about to study
Kakao wrote this to explain how they thought about a problem. You should know the basics: caching, queues and replication.
Ideas you will meet
- Distributed Systems
- Consensus, time, failure and the fundamentals of scale-out.
What we already know about this
Our own lessons on these ideas. Read them here before you start, so it makes sense.
Software Design Essentials · 9 minCreational patterns: Factory, Builder, SingletonWays to create objects without hard-wiring the exact class: factories, builders, prototypes and why Singleton is usually a last resort.Read here
The goal
Creational patterns manage how objects are created, so the rest of the code does not depend on exact classes or messy construction steps.
Factory Method (and simple factories)
Callers ask for what they need, and a factory decides which concrete class to create.
interface Sender { send(to: string, text: string): Promise<void> } class EmailSender implements Sender { async send(to: string, text: string) { /* ... */ } } class SmsSender implements Sender { async send(to: string, text: string) { /* ... */ } } function createSender(channel: "email" | "sms"): Sender { switch (channel) { case "email": return new EmailSender(); case "sms": return new SmsSender(); } } await createSender(user.preferredChannel).send(user.contact, "Your code is 482913");Benefits: one place to change when classes change, callers depend only on the interface, and tests can supply fakes. A registry (a map from name to constructor) makes adding a type a one-line change.
Factory Method as a picture
100%Figure SDA-SDE-03-1 · Calling code, factory and products · © forcsguy.com
Abstract Factory
Create families of related objects that must be used together, such as a UI toolkit's button, checkbox and menu for one platform or theme.
interface UiFactory { button(): Button; checkbox(): Checkbox } class DarkUi implements UiFactory { /* returns dark variants */ } class LightUi implements UiFactory { /* returns light variants */ }Use it when several products must stay consistent. Skip it when you only vary one object.
Builder
Construct a complex object step by step, especially with many optional parts. In languages with named parameters or option objects this is often just that.
const request = new RequestBuilder("https://api.example.com/orders") .method("POST") .header("Authorization", token) .json({ items }) .timeout(5000) .build(); // validates and returns an immutable RequestBenefits: readable construction, validation in one place, and immutable results. The alternative, a constructor with ten positional parameters, is easy to misuse.
Prototype
Create new objects by copying an existing one, useful when creation is expensive or when you want variations of a configured template.
const base = { retries: 3, timeout: 2000, headers: { accept: "json" } }; const slow = { ...base, timeout: 10000 }; // shallow copy with a change const deep = structuredClone(base); // deep copyBeware shallow versus deep copies: sharing nested objects causes surprising bugs.
Singleton
Ensures only one instance exists and gives global access to it.
class Config { private static instance?: Config; static get(): Config { return (Config.instance ??= new Config()); } }It looks convenient but has real costs: hidden dependencies, global mutable state, difficulty in testing (state leaks between tests), and trouble with concurrency. Often what you really need is one instance, not global access.
Better: create the single instance once, in the application's start-up code (the composition root), and inject it into what needs it. You keep "only one" without making it global.
Choosing
Situation Pattern Which class to create depends on input or configuration Factory Method or a registry Several related objects must match Abstract Factory Many optional parts, validation needed Builder or an options object Cloning a configured template Prototype or a copy "There should be only one" Create one in the composition root and inject it Prefer the lightest form your language offers: a function that returns an object is often all the "factory" you need.
Real-world reading
Related reading
- Ambry: Distributed Immutable Object Store at LinkedInLinkedIn engineers · LinkedInCase Studies
- XCMetrics: All-in-One Tool for Tracking Xcode Build Metrics at SpotifySpotify engineers · SpotifyCase Studies
- Hugging Face BlogHugging Face engineers · Hugging FaceBlogs
- Design Patterns CatalogueRefactoring GuruDocumentation
Show 6 moreShow fewer
- The Twelve-Factor AppAdam Wiggins · 12factor.netDocumentation
- Scaling Global CDN at Netflix - Dave Temkin, Director of Global Networks at NetflixNetflixYouTube
- 8 Things You Need to Know Before a System Design InterviewGainlo engineers · GainloBlogs
- Cloud Object Store at YahooYahoo engineers · YahooCase Studies
- Dynamometer: Scale Testing HDFS on Minimal Hardware with Maximum Fidelity at LinkedInLinkedIn engineers · LinkedInCase Studies
- Kakao Blog (Korean)Kakao engineers · KakaoBlogs
Go deeper on this
A path through videos, articles, other case studies and code on the same ideas as Kakao Blog (Korean).
Warm upGet the vocabulary first.
Books · Free from the author
Concurrent and Distributed Systems (Cambridge lecture notes)
Eight lectures on time, broadcast, replication, consensus and transactions, with notes, slides and video. Free from the author under CC BY-SA.
University of CambridgeIntermediate
Books · Free from the author
Computer Networks: A Systems Approach
How networks are built and why: protocols, routing, congestion control and the internet's architecture. The authors publish it free online under CC BY 4.0.
Systems ApproachIntermediate
WatchHow others solve the same problem, on video.
Videos belong to their creators and play from YouTube. More on YouTube (opens in a new tab)
ReadEngineers explain it in their own words.
Blogs · Free from the author · Read here
Scalable Web Architecture and Distributed Systems
A full chapter on the building blocks of large websites: availability, performance, reliability, scalability, caches, proxies, indexes, load balancers and queues. Free to read here under CC BY 3.0.
The Architecture of Open Source ApplicationsBeginner40 min
Papers · Read here
Facebook’s photo storage
This paper describes Haystack, an object storage system optimized for Facebook’s Photos application. Facebook currently stores over 260 billion images, which translates to over 20 petabytes of data.
USENIXIntermediate
See it in another companyThe same ideas, a different system.
Case Studies · Read here
Aroma: Using ML for Code Recommendation at Facebook
Thousands of engineers write the code to create our apps, which serve billions of people worldwide. This is no trivial task—our services have grown so diverse and complex that the codebase contains…
FacebookIntermediate
Case Studies · Read here
Brooklin: Distributed Service for Near Real-Time Data Streaming at LinkedIn
Brooklin—a distributed service for streaming data in near real-time and at scale—has been running in production at LinkedIn since 2016, powering thousands of data streams and over 2 trillion messages per day. Today, w...
LinkedInIntermediate
Read the codeSee how it looks when it is real.
GitHub
Engineering Blogs
A huge directory of company engineering blogs to learn from real production systems.
kilimchoiIntermediate
GitHub
Awesome Scalability
Curated reading list of articles on the architecture of scalable, reliable systems.
binhnguyennusIntermediate
Keep learning
Loading community…