Library / Blogs
Novoda Engineering Blog
Learn how we think, what we value, and what's up next here at Novoda.
By Novoda engineers · Novoda · Added 2026-10-12
All content belongs to Novoda engineers / Novoda. 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
Novoda 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.
Core Concepts: How Things Actually Work · 9 minStoring passwords and managing sessionsHashing, salting and slow password hashes, plus how sessions and tokens keep users signed in safely.Read here
Never store the password
You do not need to know a user's password, only to check it. So store a one-way hash of it.
Why plain hashes are not enough
General-purpose hashes (MD5, SHA-256) are built to be fast. An attacker with your leaked hashes can try billions of guesses per second, and use precomputed tables (rainbow tables) for common passwords.
What to do instead
- Add a unique random salt per user, stored next to the hash. Identical passwords then produce different hashes, and precomputed tables are useless.
- Use a password hashing function designed to be slow and memory-hungry: Argon2id, bcrypt or scrypt, with a work factor you raise as hardware improves.
- Optionally add a server-side secret ("pepper") kept outside the database.
100%Figure SDA-CORE-06-1 · What to do instead · © forcsguy.com
Sessions: staying signed in
After login, the server must recognise the user on later requests.
- Server-side session: the server stores session data and gives the browser an unguessable session ID in a cookie. Easy to revoke (delete the record).
- Token-based (for example JWT): the server signs a token containing the user's identity and the client sends it each time. No lookup is needed, but revoking one before it expires is hard, so keep lifetimes short and use refresh tokens.
Neither is automatically better. Server-side sessions are simpler and safer for typical web apps; tokens suit APIs and service-to-service calls.
Cookie settings that matter
HttpOnly: scripts cannot read it, which limits damage from cross-site scripting.Secure: only sent over HTTPS.SameSite=LaxorStrict: reduces cross-site request forgery.- A sensible expiry, and a new session ID after login to prevent session fixation.
Other protections
- Rate limit login attempts and add lockout or delays.
- Offer multi-factor authentication.
- Compare secrets with a constant-time comparison.
- Reset passwords with short-lived, single-use links sent to a verified email.
- Never log passwords or tokens.
Real-world reading
Related reading
- Pagelets Parallelize Server-side Processing at YelpYelp engineers · YelpCase Studies
- Server Side Rendering at WixWixYouTube
- MongoDB at Baidu: Multi-Tenant Cluster Storing 200+ Billion Documents across 160 ShardsMongodb engineers · MongodbCase Studies
- Secure Infrastructure To Store Bitcoin In The Cloud at CoinbaseCoinbase engineers · CoinbaseCase Studies
Show 6 moreShow fewer
- Sherpa: Distributed NoSQL Key-Value Store at YahooYahoo engineers · YahooCase Studies
- Akutan: Distributed Knowledge Graph Store at eBayeBay engineers · eBayCase Studies
- The Site Reliability WorkbookGoogle SRE team · O'Reilly / GoogleBooks
- Espresso: Distributed Document Store at LinkedInLinkedIn engineers · LinkedInCase Studies
- Datadog Engineering BlogDatadog engineers · DatadogBlogs
- Novoda Engineering BlogNovoda engineers · NovodaBlogs
Go deeper on this
A path through videos, articles, other case studies and code on the same ideas as Novoda Engineering Blog.
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…