[1/3] System Design for Interviews and Beyond (Category Architecture)
I finally finished this one. course With Leetcode, we talked about what a system design interview is and what it is designed to check with candidates. There is a lot of theory in this course, but it is presented in a practice-oriented form - the author does not talk about conditional networks from the beginning of time to the present day, but reveals the main concepts when it comes to communication between the components of the system. The same thing happens with data storage - it is easy to go deep into theory, but it is difficult to hold back and talk about b-tree and lsm-tree along the way, considering the real challenges of system design. But the author perfectly copes with the challenge and tells both clearly and accurately. If we return to the content of the course, it consists of the following parts:
1. How to define system requirements. Here the author spoke about the importance of functional and non-functional requirements, and then passed on typical architectural characteristics. n (-ilities)System design interviews: high availability, fault tolerance, scalability, performance, durability, consistency, maintainability, security, cost efficiency. The author of the course was perfectly able to explain all these characteristics literally on his fingers, and also to show their connection with each other, conditionally, everything can be done safely just by disabling the system and making it inaccessible, but it seems that we need a balance:)
2. How to achieve certain system qualities with the help of hardware. Here, the author draws a link between the architectural characteristics of the system and how it is deployed. He talks about the concepts of regions, availability zones, date centers, racks and final servers. Then he goes on to talk about servers, virtual machines, containers and even serverless. I think you need to know this base to design coherent systems.
3. Fundamentals of reliable, scalable, and fast communication. In order for the individual parts to become a system, these parts must be able to communicate effectively with each other. In this chapter, the author talks about this, and for this he says the basics. Synchronous and asynchronous communication Patterns of asynchronous communications (messaging queue, publish/subscribe, competing consumers, request/response, priority queue, claim check)
- Network protocols (UDP, TCP/IP, HTTP) Blocking and non-blocking I/O operations (i/o)
- Data coding format (Binary and textual, backward/forward compatibility)
4. How to improve system performance with caching. In this section, the author talks about caching, but the section itself seemed to me to be taken out of the context of the story - conditionally, they have not yet talked about data storage, but have already stuck the caches somewhere:)
5. The importance of queues in distributed systems. An important section in which the author analyzes queues in detail and their use in distributed systems (In system design, you usually design a distributed system.). In general, the author says about the following concepts: Bounded and unbounded queue and circular buffer (For example, when you have logs in a circle overwritten into one limited file.) What to do with overflowing queues and empty queues: load shedding, rate limiting, dead letter queues, backpressure, elastic scaling Producer-consumer patterns that block queues, semaphores How thread pools work, what is the difference between cpu-bound and i/o-bound tasks, how to ensure graceful shutdown How batching and parallel job processing work
Continuation of the review will be in next post.
#Software #Architecture #DistributedSystems #SystemDesign #Engineering