The 2 levels of system design
- First is what we call 'lower-level system design'. This is really just good software development practices.
It's about data structures, the interfaces of class and modules, using good design patterns, algorithmic and spatial complexity, maintainability and readability, and so on.
That said, when people talk about 'system design', they typically mean the 2nd level, which is:
- Higher-level system design. Dealing with the structure of the software system above the level of the code.
As a simple example, let's say you make a web application.
You have a program - the web server - that accepts incoming HTTP requests, and gives back a response. And while processing that request, it talks to a database: reading rows of data from a table, inserting new rows, et cetera.
So at a minimum, you have 2 processes:
a. the web server b. the database server
Which already brings up a zillion system design considerations:
-
How do you handle logging of HTTP requests? Just write those log records to a file? Or should you send it to a separate logging server (which would be a 3rd process)? Oh, and how long do you want to keep old log data?
-
What's your strategy for database backups? You DO have one, right?!
-
How will you restore from that backup if you need to? Do you have exact steps written down, so you don't have to figure it out on the fly?
-
When you publish changes to the web app codebase, how does that get deployed?
-
What about changes in the database schema?
-
How do you make sure the web server can securely connect to the database server, while also locking it down so evil hackerz cannot steal your data?
-
If you push a change to the live server, and realize it was a mistake and need to roll it back, what's your exact plan for doing that?
-
Are you running the database on the same (virtual) machine as the web server? Why or why not?
-
How do you estimate the disk space that the web server virtual machine needs? And same for the database, if it's on a different VM?
This is just a tiny handful of a very long list of questions you must consider with high-level system design.
And that's with the tiniest possible system. Literally two processes. You're not even worrying about a load balancer at this point.
But I would say good system design is necessary to operate at highest levels as a technology professional. It's where you can solve big and important problems that a single program cannot.
I will say more about high-level system design in upcoming posts. For now, reply and tell me what questions you have on this topic; I'll write about some of them.
P.S. For the boundary between high-level and low-level: You can also think about it in terms of the process boundary. Lower-level system design is about what's happening inside a single process; higher-level is about how 2 or more processes interact. I have never heard anyone else describe it this way, but in practice it clearly defines the boundary between the two.
P.P.S. If you want to learn both levels of system design, and how they interact, go here:
https://boostedcode.com