Google Cloud's Core Principles of System Design [System Design sundays]
Creating a robust system that is secure, reliable, scalable, and independent.
Hey, it’s your favorite cult leader here 🐱👤
On Sundays, I will go over various Systems Design topics⚙⚙. These can be mock interviews, writeups by various organizations, or overviews of topics that you need to design better systems. 📝📝
To get access to all the articles, support my crippling chocolate milk addiction, and become a premium member of this cult, use the button below-
p.s. you can learn more about the paid plan here.
Recently, I came across a fantastic guide written by Google Cloud Developers called Core principles of system design. The document was succinct, informative, and understandable. Let’s get right into it-
Core Principles of System Design- TL;DR
Goals of System Design- We want to design a robust system. What is a Robust System you ask? “A robust system design is secure, reliable, scalable, and independent. It lets you make iterative and reversible changes without disrupting the system, minimize potential risks, and improve operational efficiency. To achieve a robust system design, we recommend that you follow four core principles.”
Principle 1, Document everything- This should come as no shock to you. Good documentation allows you to visualize current deployments, enables cross-functional collaboration, and contextualizes design decisions for newcomers. We have a comprehensive (and very popular) guide to documentation here.
Principle 2, Simplify your design and use fully managed services- This one is music to my years, because I’ve been preaching this for as long as I’ve been writing. If your architecture is too complex to understand, it will be difficult to implement the design and manage it over time. Complex architectures are not the mark of a great engineer, just a short-sighted one.
we found that differences in architectural complexity could account for 50% drops in productivity, three-fold increases in defect density, and order-of-magnitude increases in staff turnover.
One of the most powerful techniques is to leverage fully managed services. Fully managed means you don't have to set up any machines, the management, patching, and backup are mostly all taken care of for you. This is typically accomplished by leveraging third-party contractors and products to simplify workflows. The upfront costs pay themselves back many times over. If your group is looking for a good starting place, feel free to drop me a message. I’d be happy to get into details with you.
Principle 3, Decouple your architecture- Decoupling is a technique that's used to separate your applications and service components into smaller components that can operate independently. This improves the flexibility and security of your system and allows you to make changes easier. This forms the basis of microservices architecture, but you want to be careful here. Implementing this takes a lot of effort and challenges, and if done badly, your overheads will shoot up, as Amazon found out. Decoupling is a good thing, but it can be taken too far.
Principle 4, Use a stateless architecture- As covered in our writeup on Stateless architecture, Stateless architecture is a bit of a misnomer. It’s not that your app doesn’t track state (this is needed) but this tracking is outsourced to systems that can do it better. By using tools like cookies, sharing Redis instances for storing state b/w servers, etc. handling states becomes much easier. Stateless architecture is well-suited to a world where PCs have been sipping on that jungle juice and advanced hardware is cheap. This enables Client side computers to step in and take some of the computational load. This is a win for all- Client experience is smoother since storing state client side is more robust and server-side computations and scaling become easier.
To read more about what the cloud Devs had to say, I’m quoting their principles below-
Document everything
When you start to move your workloads to the cloud or build your applications, a major blocker to success is lack of documentation of the system. Documentation is especially important for correctly visualizing the architecture of your current deployments.
A properly documented cloud architecture establishes a common language and standards, which enable cross-functional teams to communicate and collaborate effectively. It also provides the information that's necessary to identify and guide future design decisions. Documentation should be written with your use cases in mind, to provide context for the design decisions.
Over time, your design decisions will evolve and change. The change history provides the context that your teams require to align initiatives, avoid duplication, and measure performance changes effectively over time. Change logs are particularly valuable when you onboard a new cloud architect who is not yet familiar with your current system design, strategy, or history.
Simplify your design and use fully managed services
Simplicity is crucial for system design. If your architecture is too complex to understand, it will be difficult to implement the design and manage it over time. Where feasible, use fully managed services to minimize the risks, time, and effort associated with managing and maintaining baseline systems.
If you're already running your workloads in production, test with managed services to see how they might help to reduce operational complexities. If you're developing new workloads, then start simple, establish a minimal viable product (MVP), and resist the urge to over-engineer. You can identify exceptional use cases, iterate, and improve your systems incrementally over time.
Decouple your architecture
Decoupling is a technique that's used to separate your applications and service components into smaller components that can operate independently. For example, you might break up a monolithic application stack into separate service components. In a decoupled architecture, an application can run its functions independently, regardless of the various dependencies.
A decoupled architecture gives you increased flexibility to do the following:
Apply independent upgrades.
Enforce specific security controls.
Establish reliability goals for each subsystem.
Monitor health.
Granularly control performance and cost parameters.
You can start decoupling early in your design phase or incorporate it as part of your system upgrades as you scale.
Use a stateless architecture
A stateless architecture can increase both the reliability and scalability of your applications.
Stateful applications rely on various dependencies to perform tasks, such as locally cached data. Stateful applications often require additional mechanisms to capture progress and restart gracefully. Stateless applications can perform tasks without significant local dependencies by using shared storage or cached services. A stateless architecture enables your applications to scale up quickly with minimum boot dependencies. The applications can withstand hard restarts, have lower downtime, and provide better performance for end users.
The system design category describes recommendations to make your applications stateless or to utilize cloud-native features to improve capturing machine state for your stateful applications.
That is it for this piece. I appreciate your time. As always, if you’re interested in working with me or checking out my other work, my links will be at the end of this email/post. If you like my writing, I would really appreciate an anonymous testimonial. You can drop it here. And if you found value in this write-up, I would appreciate you sharing it with more people. It is word-of-mouth referrals like yours that help me grow.
Save the time, energy, and money you would burn by going through all those videos, courses, products, and ‘coaches’ and easily find all your needs met in one place at ‘Tech Made Simple’! Stay ahead of the curve in AI, software engineering, and the tech industry with expert insights, tips, and resources. 20% off for new subscribers by clicking this link. Subscribe now and simplify your tech journey!
Using this discount will drop the prices-
800 INR (10 USD) → 640 INR (8 USD) per Month
8000 INR (100 USD) → 6400INR (80 USD) per year (533 INR /month)
Reach out to me
Use the links below to check out my other content, learn more about tutoring, reach out to me about projects, or just to say hi.
Small Snippets about Tech, AI and Machine Learning over here
AI Newsletter- https://artificialintelligencemadesimple.substack.com/
My grandma’s favorite Tech Newsletter- https://codinginterviewsmadesimple.substack.com/
Check out my other articles on Medium. : https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Reach out to me on LinkedIn. Let’s connect: https://rb.gy/m5ok2y
My Instagram: https://rb.gy/gmvuy9
My Twitter: https://twitter.com/Machine01776819