Manoj Nanduri’s Post

View profile for Manoj Nanduri, graphic

Engineering and Technology Leader | Leading High-Impact Tech Teams to Build Scalable Cloud Native Microservices and Enterprise Systems | Agile, DevOps, Digital Transformation | ISB Executive Alumnus | IIT Kanpur Graduate

🖇️𝐋𝐞𝐯𝐞𝐥𝐬 𝐨𝐟 𝐂𝐨𝐧𝐬𝐢𝐬𝐭𝐞𝐧𝐜𝐲 𝐢𝐧 𝐃𝐢𝐬𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐝 𝐒𝐲𝐬𝐭𝐞𝐦𝐬 - 𝐋𝐢𝐧𝐞𝐚𝐫𝐢𝐳𝐚𝐛𝐥𝐞, 𝐂𝐚𝐮𝐬𝐚𝐥, 𝐄𝐯𝐞𝐧𝐭𝐮𝐚𝐥 𝐚𝐧𝐝 𝐦𝐨𝐫𝐞..🔗 𝘊𝘰𝘯𝘴𝘪𝘴𝘵𝘦𝘯𝘤𝘺 𝘪𝘯 𝘥𝘪𝘴𝘵𝘳𝘪𝘣𝘶𝘵𝘦𝘥 𝘴𝘺𝘴𝘵𝘦𝘮𝘴 𝘦𝘯𝘴𝘶𝘳𝘦𝘴 ✅ 𝐔𝐧𝐢𝐟𝐨𝐫𝐦 𝐃𝐚𝐭𝐚 𝐕𝐢𝐞𝐰: All users see the same data, regardless of which server or node they access ✅ 𝐀𝐜𝐜𝐮𝐫𝐚𝐭𝐞 𝐔𝐩𝐝𝐚𝐭𝐞𝐬: Changes, such as updates or writes, are reflected reliably across the entire system ✅ 𝐓𝐫𝐮𝐬𝐭: Critical for systems with multiple data copies (e.g., databases or cloud services) For example, ➡️ in 𝐛𝐚𝐧𝐤𝐢𝐧𝐠, strict consistency ensures a user’s balance is updated immediately across all nodes after a transaction, as even a 𝒎𝒊𝒏𝒐𝒓 𝒊𝒏𝒄𝒐𝒏𝒔𝒊𝒔𝒕𝒆𝒏𝒄𝒚 𝒄𝒂𝒏 𝒍𝒆𝒂𝒅 𝒕𝒐 𝒇𝒊𝒏𝒂𝒏𝒄𝒊𝒂𝒍 𝒅𝒊𝒔𝒄𝒓𝒆𝒑𝒂𝒏𝒄𝒊𝒆𝒔 𝒐𝒓 𝒍𝒐𝒔𝒔 𝒐𝒇 𝒕𝒓𝒖𝒔𝒕 ➡️In contrast, 𝐬𝐨𝐜𝐢𝐚𝐥 𝐦𝐞𝐝𝐢𝐚 𝐩𝐥𝐚𝐭𝐟𝐨𝐫𝐦𝐬 can tolerate slight delays in updates, such as a like or comment taking a few seconds to appear across devices, 𝒑𝒓𝒊𝒐𝒓𝒊𝒕𝒊𝒛𝒊𝒏𝒈 𝒔𝒑𝒆𝒆𝒅 𝒂𝒏𝒅 𝒂𝒗𝒂𝒊𝒍𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝒐𝒗𝒆𝒓 𝒊𝒎𝒎𝒆𝒅𝒊𝒂𝒕𝒆 𝒄𝒐𝒏𝒔𝒊𝒔𝒕𝒆𝒏𝒄𝒚. However, 𝒂𝒄𝒉𝒊𝒆𝒗𝒊𝒏𝒈 𝒄𝒐𝒏𝒔𝒊𝒔𝒕𝒆𝒏𝒄𝒚 𝒐𝒇𝒕𝒆𝒏 𝒄𝒐𝒎𝒆𝒔 𝒘𝒊𝒕𝒉 𝒕𝒓𝒂𝒅𝒆-𝒐𝒇𝒇𝒔, as ensuring it can impact system speed, availability, or fault tolerance, depending on the design choices. Different 𝐥𝐞𝐯𝐞𝐥𝐬 𝐨𝐟 𝐜𝐨𝐧𝐬𝐢𝐬𝐭𝐞𝐧𝐜𝐲 (𝐞.𝐠., 𝐬𝐭𝐫𝐢𝐜𝐭, 𝐜𝐚𝐮𝐬𝐚𝐥, 𝐞𝐯𝐞𝐧𝐭𝐮𝐚𝐥) are used based on the needs of the application. This wonderful post by Raul Junco demystifies the different levels of consistency and the tradeoffs they involve along with nice and easy to understand visuals. #Engineering #APIs #EngineeringCommunity #Upskilling #SystemDesign #SoftwareArchitecture #Microservices #TechCommunity #SoftwareEngineering #Programming #CollaborativeLearning

View profile for Raul Junco, graphic

Simplifying System Design

Consistency is negotiable!  The real question is, how much will you pay for it? In Distributed Systems, consistency ensures that changes appear correctly across the board, everywhere, every time. For example, if you like a friend's photo on Facebook, the like count should show "100" for you and your friend, no matter where you are. But, not all systems need perfect consistency. Social features like Facebook likes don't have to be perfect all the time. Yet consistency is crucial for banking systems to avoid errors like duplicate transactions. There are four types of consistency in distributed systems: 𝟭. 𝗦𝘁𝗿𝗶𝗰𝘁 𝗼𝗿 𝗟𝗶𝗻𝗲𝗮𝗿𝗶𝘇𝗲𝗱 𝗖𝗼𝗻𝘀𝗶𝘀𝘁𝗲𝗻𝗰𝘆 This is the strictest type of consistency. Imagine a system that handles one request at a time, like people waiting in line.  Each request is processed completely before the next one starts, making sure everyone sees the same thing at the same time. 𝗣𝗿𝗼𝘀 𝗮𝗻𝗱 𝗖𝗼𝗻𝘀: • Very accurate but slow because each request has to wait its turn. • If a request takes too long, everything else gets delayed. 𝟮. 𝗖𝗮𝘂𝘀𝗮𝗹 𝗖𝗼𝗻𝘀𝗶𝘀𝘁𝗲𝗻𝗰𝘆 This type of consistency is more relaxed. It only makes sure that related actions happen in the right order.  For example, if Alice posts something and then comments on it, the system must keep those actions in the correct order. But if Bob likes a different post, the system can handle that separately. 𝗣𝗿𝗼𝘀 𝗮𝗻𝗱 𝗖𝗼𝗻𝘀: • Faster than strict consistency. • Slightly less accurate since unrelated actions can happen at the same time, which might cause some confusion. 𝟯. 𝗘𝘃𝗲𝗻𝘁𝘂𝗮𝗹 𝗖𝗼𝗻𝘀𝗶𝘀𝘁𝗲𝗻𝗰𝘆 This type focuses on being fast and always available.  It doesn't guarantee that all users will see changes right away, but eventually, everyone will see the same data. Think of a social media-like count that takes a moment to update for everyone. Good for systems where a small delay is okay. 𝗣𝗿𝗼𝘀 𝗮𝗻𝗱 𝗖𝗼𝗻𝘀: • Fast and highly available, but not immediately accurate. • Works well for non-critical updates where some delay is acceptable. 𝟰. 𝗤𝘂𝗼𝗿𝘂𝗺 𝗖𝗼𝗻𝘀𝗶𝘀𝘁𝗲𝗻𝗰𝘆 Quorum consistency lets you choose how many servers must agree before confirming a change.  Imagine you have three servers and decide that at least two of them must agree to consider the data accurate. 𝗛𝗼𝘄 𝗜𝘁 𝗪𝗼𝗿𝗸𝘀: • You can make it stricter or more relaxed based on how many servers need to agree. • More servers agreeing means more consistency. Fewer servers mean more flexibility and speed. 𝗣𝗿𝗼𝘀 𝗮𝗻𝗱 𝗖𝗼𝗻𝘀: • Flexible: You can adjust how much consistency you want versus how fast it should be. • Lets you balance between accuracy and speed. Lower consistency isn’t always bad; it often offers better speed or availability. You have to pick. But, stay Consistent!

  • No alternative text description for this image
Manoj Nanduri

Engineering and Technology Leader | Leading High-Impact Tech Teams to Build Scalable Cloud Native Microservices and Enterprise Systems | Agile, DevOps, Digital Transformation | ISB Executive Alumnus | IIT Kanpur Graduate

4w

💡 𝑾𝒂𝒏𝒕 𝒕𝒐 𝒅𝒊𝒗𝒆 𝒅𝒆𝒆𝒑𝒆𝒓? 𝑯𝒆𝒓𝒆 𝒂𝒓𝒆 𝒔𝒐𝒎𝒆 𝒈𝒓𝒆𝒂𝒕 𝒓𝒆𝒔𝒐𝒖𝒓𝒄𝒆𝒔 𝒕𝒐 𝒎𝒂𝒔𝒕𝒆𝒓 𝒕𝒉𝒆𝒔𝒆 𝒄𝒐𝒏𝒄𝒆𝒑𝒕𝒔: 📖 "𝐃𝐞𝐬𝐢𝐠𝐧𝐢𝐧𝐠 𝐃𝐚𝐭𝐚-𝐈𝐧𝐭𝐞𝐧𝐬𝐢𝐯𝐞 𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬" by Martin Kleppmann [https://lnkd.in/dsxiwq4H] 📖 "𝐃𝐢𝐬𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐝 𝐒𝐲𝐬𝐭𝐞𝐦𝐬: 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞𝐬 𝐚𝐧𝐝 𝐏𝐚𝐫𝐚𝐝𝐢𝐠𝐦𝐬" by Andrew Tanenbaum [https://lnkd.in/diK8yVt5]

Like
Reply
Manoj Nanduri

Engineering and Technology Leader | Leading High-Impact Tech Teams to Build Scalable Cloud Native Microservices and Enterprise Systems | Agile, DevOps, Digital Transformation | ISB Executive Alumnus | IIT Kanpur Graduate

4w

💡 𝑾𝒂𝒏𝒕 𝒕𝒐 𝒅𝒊𝒗𝒆 𝒅𝒆𝒆𝒑𝒆𝒓? 𝑯𝒆𝒓𝒆 𝒂𝒓𝒆 𝒔𝒐𝒎𝒆 𝒈𝒓𝒆𝒂𝒕 𝒓𝒆𝒔𝒐𝒖𝒓𝒄𝒆𝒔 𝒕𝒐 𝒎𝒂𝒔𝒕𝒆𝒓 𝒕𝒉𝒆𝒔𝒆 𝒄𝒐𝒏𝒄𝒆𝒑𝒕𝒔: 📖 "𝐃𝐞𝐬𝐢𝐠𝐧𝐢𝐧𝐠 𝐃𝐚𝐭𝐚-𝐈𝐧𝐭𝐞𝐧𝐬𝐢𝐯𝐞 𝐀𝐩𝐩𝐥𝐢𝐜𝐚𝐭𝐢𝐨𝐧𝐬" by Martin Kleppmann [https://lnkd.in/dsxiwq4H] 📖 "𝐃𝐢𝐬𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐝 𝐒𝐲𝐬𝐭𝐞𝐦𝐬: 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞𝐬 𝐚𝐧𝐝 𝐏𝐚𝐫𝐚𝐝𝐢𝐠𝐦𝐬" by Andrew Tanenbaum [https://lnkd.in/diK8yVt5]

Like
Reply
Raul Junco

Simplifying System Design

4w

Thanks for sharing, Manoj Nanduri 👌

See more comments

To view or add a comment, sign in

Explore topics