Filter
Exclude
Time range
-
Near
Visual summary of the session #caching #consistenthashing
Do you know how companies scale their cache for millions of users? Today I learned how caching consistent hashing power large distributed systems. Key takeaways from the session: → Cache stores frequently accessed data in fast memory to avoid expensive DB queries. → Use Redis as a cache layer and apply read-through caching to fetch from DB only on cache miss. → Use TTL to avoid stale data and start with a “magic number” that can later be tuned using real usage data. → When cache storage is full, apply eviction strategies like LRU to remove less useful data. → To scale caching servers without huge data reshuffling, use consistent hashing, which keeps data movement minimal when servers are added or removed. System design lesson of the day: Good architecture is not about avoiding problems. It is about reducing their impact at scale. 🚀 #SytemDesign
1
8
107
In today’s system design cohort we learn about consistent hashing. Highlights 1. What is redis 2. Distributed system 3. Hashing function 4. Consistent hashing 5. Introduction to aws @piyushgarg_dev @Hiteshdotcom @nirudhuuu @yntpdotme #SystemDesign #consistenthashing #aws #chaicode
1
23
485
Day-11 | Consistent Hashing Consistent Hashing: One of the smartest tricks in distributed systems. 👇 When systems scale, adding or removing servers can cause massive data reshuffling. Consistent hashing solves this problem. Instead of assigning data randomly, it maps servers and keys onto a circular hash ring. When a new server is added: Only a small portion of data moves. When a server fails: Only the neighboring keys get redistributed. This makes systems scalable, efficient, and fault-tolerant. That’s why technologies like: distributed caches databases load balancers use consistent hashing to handle millions of requests smoothly. Think of it like placing data on a ring where each server is responsible for a small section. Add a server → small shift Remove a server → minimal disruption Simple idea. Massive impact. #ConsistentHashing #SystemDesign #AWS #DevOps
12 Must-Know Concepts, Explaining from Concept-level Follow along and let's learn together! ✨ @awsdevelopers anything I missed, you please add-on to list. #AWS #AWSCommunityBuilders #DevOps #Developers
3
11
70
3,239
Today I learned about Consistent Hashing 🔁 • A hash function maps keys → servers • With normal hashing, adding/removing a server causes massive key reshuffling • This leads to uneven load distribution and cache misses • Consistent Hashing fixes this by placing servers on a circular hash ring • Virtual Nodes (vnodes) improve load balance by splitting one server into multiple points on the ring • Widely used in distributed caches, databases, CDNs Learned this beautifully via the circular ring example by @piyushgarg_dev sir System design concepts like this change how you think about scalability. #SystemDesign #ConsistentHashing #DistributedSystems #Scalability #Backend #Caching #DevLearning #BuildInPublic
8
14
239
11,693
Day 16: Consistent Hashing Unleashed 🔄 The Magic of Consistent Hashing: Your Data’s Smart Ring Imagine a never-ending circle where data keys and servers play ring-around-the-rosy – no chaos when things change! 😩 Old-School Hashing Woes: Hash(key) % N servers = Boom! Add or remove a server? Rehash everything – 80% data shuffle? Ouch! 💸 ✨ Consistent Hashing Fix: •Servers chill on a virtual ring via hashes •Data keys hash onto the ring too •Key lands with the next server clockwise 🛠️ Step-by-Step Magic: 1Hash servers to spots on the ring 2Hash your data key 3Clockwise to the nearest server 4New server joins? Only a sliver of data relocates! 🌟 Why It’s a Game-Changer: ✅ Low Drama Rehashing: Just ~1/N data moves on changes ✅ Even Load: Virtual nodes keep things balanced ✅ Resilient AF: One server down? Minimal impact ✅ Scale Like a Boss: Add/remove nodes seamlessly 📈 In the Wild: Amazon DynamoDB: Powers massive partitioning for zillions of requests/sec – auto-scales without the hassle! Apache Cassandra: Nodes claim ring slices, replicate to neighbors – zero single failures! ⚡ Pro Tip: Virtual Nodes Assign multiple spots per server for: •Ultra-even distribution •Gentle data shifts •Handles beefy vs. lightweight servers 🚧 The Catch: •Bit more intricate than basic hashing •Pick a solid hash algo •Manage those virtual nodes 🔥 Ideal For: Distributed caches, NoSQL DBs, CDNs, load balancers Make your systems elastic and unbreakable with consistent hashing! #ConsistentHashing #DistributedSystems #Scalability #TechTips
Day 15: Database Sharding Imagine your database is one massive, city-wide library. Finding a book is getting slow! 😩 Sharding is like building smaller, neighborhood library branches. 🏡 Each "branch" (or shard) holds a portion of the books (data), making everything faster and easier to manage. How do you sort the books? • Range-Based: Branch 1 gets Authors A-M, Branch 2 gets N-Z. (Simple, but one branch might get too busy!) • Hash-Based: A magic formula sends books to branches evenly. (Great for distribution!) • Directory-Based: A master catalog tells you exactly which branch every book is in. (Flexible, but adds a step.) Why do it? ✅ Insane Scalability ✅ Faster Performance ✅ Better Availability The Catch? ⚠️ Complex setup & maintenance ⚠️ Asking for books from two different branches at once is a pain (cross-shard queries). Rule of Thumb: Shard when your single library is overflowing, not just because you can build new ones. #SystemDesign #Database #Scalability #BigData #Sharding
1
8
230
While learning about a Distributed database, I always wonder how the backend knows which database to take details from? While surfing the internet, I got to know about consistent hashing. This is a System Design topic, which helps to scale the database horizontally. and used to effectively request the data from the Horizontal Database. It creates a hash of each database(server) and the Data(key) and aligns them in the circular ring. And assign the data to the database by going clockwise. For more details, read the following blog, which I referred to. It's a talk in-depth about this topic and the difference between the Traditional vs Modern approach, what if any database receives more data compared to other databases (solution -> Virtual databases) : bytebytego.com/courses/syste… @bytebytego #hashing #consistentHashing
8
174
2 Feb 2025
Consistent Hashing explained in 1 minute. Cheers! #SystemDesign #ConsistentHashing #LoadBalancing
1
24
281
5,589
Day 80: From Concept to Code: Implementing a Dummy Consistent Hashing in Java using TreeMap 🚀 🔍 Key concepts: hash functions, hash rings, virtual nodes, replication, quorum mohibulsblog.netlify.app/pos… #DistributedSystems #ConsistentHashing #Java #100DaysOfCode #100DaysOfJava

2
46
Let's break one of the biggest misconceptions about Consistent Hashing ⚡ Many engineers think that Consistent Hashing is a service that just solves your scaling problems and you use it whenever you hit some scale. This is not true at all. Consistent Hashing is a very simple algorithm that helps you determine the ownership, that is it; and it does not take care of the data movement ⚡ It is so simple to implement CH that all it takes is an array and a binary search function for efficient implementation and can be plugged into any distributed storage system. Pro tip: Whenever you come across any concept, first understand it, then think about its implementation. Being hands-on is a great way to know the nuances. ⚡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along. youtube.com/c/ArpitBhayani #AsliEngineering #ConsistentHashing
2
65
11,934
Consistent Hashing is not some magical solution that fits everywhere. Let me tell you one place where you should never use consistent hashing ⚡ Consistent Hashing fails miserably when you need to support Range Queries across the dataset. For example: select all the keys from the KV store that lies in the range [A, C]. ⚡ Consistent hashing is a technique based on Hashing, and hence the distribution of the keys in the cluster is governed by the underlying Hashing function. Evaluation of such range queries will require expensive cross-shard queries and some coordinator stitching the data before sending it back. This kind of query is best answered when the data is laid out in order. Always remember, no concept in Computer Science is perfect; Everything just boils down to trade-offs. Remember this the next time someone says "I will use consistent hashing", just ask "why?". Very few people have the answer 🙃 ⚡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along. I have covered Consistent Hashing in-depth in the Beginner Friendly System Design course. So, if you are inclined towards learning real System Design, check it out 👇‍ arpitbhayani.me/sys-design #AsliEngineering #ConsistentHashing #SystemDesign
3
1
60
7,173
We got the code for DistributedCache, CacheNode, ConsistentHashing, EvictionStrategy (interface as well as LRU and LFU implementations). Brilliant!
1
3
1,473
Replying to @southin
This thread is saved to your Notion database. Tags: [Consistenthashing]
31 Mar 2022
#systemdesign #ConsistentHashing Does load balancer use hashing? Hashing is one of the common methods used in Load Balancing for distributing requests among the web servers.
1
4
Want to know how #consistenthashing works in a distributed system? How to create a #consistenthashring and distributing the loads across the nodes? Join the Webinar meetup.com/TechnoWise/events… to know more #100DaysOfCode #WomenWhoCode #CodeNewbie #altcampus #serverless #NodeJS

4
9
Most asked Design Interview Question in all Product MNC. What is Consistent Hashing? Click to consume a very simple explanation of it. #javascript #typescript #react #angular #Vue #consistenthashing #design #programming #coding #programmer #software link.medium.com/8H9DmLJ114

2
1
19 Mar 2019
I just published "ConsistentHashingを理解する" link.medium.com/dwAiUVhmbV DynamoDBやApache Cassandraなど分散KVSの裏側に使われているConsistentHashingというアルゴリズムについて記事を書きました。

1
9