Posts

Showing posts with the label System design

The Architect’s Edge: Mastering the Assessment Process in Consulting Architecture

Image
In the field of consulting architecture, the assessment process is a critical step for evaluating and improving a client’s system architecture. This process closely resembles the discovery phase but expands to include a broader group of stakeholders and technical experts to conduct a thorough evaluation. Below, we outline the key stages and components of an effective assessment. Preparation: Setting the Stage The assessment begins with meticulous preparation. This involves creating a comprehensive agenda to ensure all necessary topics are covered during the process. Key activities include: Gathering Requirements : Similar to the discovery phase, architects collect requirements through workshops, such as the Quality Attributes Workshop , to understand the system’s needs. Reviewing Existing Architecture : Architects examine the current architecture, accessing critical resources like source code, cloud monitoring, logging systems, security protocols, and performance tests. Stakeholder E...

The Architect’s Edge: Mastering the Architectural Design Process

Image
Architectural design is a critical process in software engineering and system architecture, ensuring that systems meet business goals and perform effectively. This article provides an overview of the architectural design process, breaking it down into three core phases: Requirements Gathering , Design , and Analysis and Testing . These steps form the foundation of most architectural methodologies, based on extensive research and practical experience. Phase 1: Requirements Gathering Requirements are the cornerstone of architectural design. They provide the foundation for all subsequent decisions and ensure that the system aligns with business objectives. Skipping or poorly defining requirements often leads to designs that fail to address critical needs, resulting in questions like, “What problem does this design solve?” or “How does it meet the business goals?” Key Aspects of Requirements Gathering Business Goals : Understand the client’s business case and objectives. These goals shape ...

The Architect’s Edge: How Requirements Drive System Success

Image
Software architecture is a disciplined approach to designing systems that meet both business and technical objectives. At its core, the process begins with a critical first step: gathering requirements. This article explores the role of requirements in software architecture, why they matter to architects, and how they are categorized to drive effective system design. The Three Steps of Architectural Design The architectural design process can be distilled into three fundamental steps: Requirements Gathering : Identifying and documenting what the system must achieve. Design : Creating the blueprint for the system based on gathered requirements. Analysis and Testing : Evaluating the design to ensure it meets the defined goals. Requirements gathering is the foundation upon which the entire architectural process rests. Without a clear understanding of requirements, the resulting design risks being misaligned with business needs or technically infeasible. Why Requirements Matter to Architec...

System design tips on how to make capacity estimation

Image
Estimation is an important skill in system design interviews because it allows you to demonstrate your ability to reason about the complexity and feasibility of a given problem. It is worth noting that estimation is an inexact science and that it is normal for estimates to be off by some margin. It is more important to show that you have a clear understanding of the problem and can provide a thoughtful and well-reasoned estimate than to provide a perfectly accurate one. Here are a few examples of the types of estimation questions you might encounter in a system design interview: How many users can a system support? For example, you might be asked to estimate the number of users that a social media platform can support, based on the number of servers, storage, and bandwidth available. How much data can a system store or process? For example, you might be asked to estimate the amount of data that a data warehouse can store, based on the size of the data, the number of serv...

Cheat sheet on how to choose database

Image
The effectiveness and scalability of your design depends greatly on the choice of database. It is possible to use multiple databases within a single system for different purposes.   DB cheet sheet (you can click on image to expand it) Caching solutions such as Redis and Memcached are key-value storage systems that can be used to improve the performance of a system by temporarily storing frequently accessed data in memory.   For storing large files such as images and videos, it is often useful to use a file storage service such as S3 or Google Cloud Storage . These are known as blob storage systems and can be used in conjunction with a content delivery network (CDN) to improve the performance and reliability of file access. To support full text search you could to use Elastic search or Solar . To support monitoring system InfluxDB or Prometheus may be good options to consider. For analytics on extremely large datasets and where transactions are not a requirement,...

10 tips when you decide to use kafka

Image
Overall, Kafka is a powerful and flexible tool that is well-suited for handling large volumes of data in real-time. Here are ten best practices when you decide to use it: To ensure high availability and handle high load, it is important to set up a cluster of servers when using Kafka, as it is designed to scale horizontally across multiple machines. Use a message retention period: Kafka allows you to specify a message retention period, which determines how long messages are kept before they are deleted. It is important to set this value appropriately to ensure that you have enough data for processing, but not so much that you run out of storage space. Use message compression: Kafka supports message compression to reduce the amount of data that needs to be transferred and stored. This can be particularly useful when sending large messages or when dealing with high volumes of data. By setting a key on each message, you can specify which partition the message should be written to in Ka...

How to design notifications service system

Image
This post is a personal cheat sheet on how to design notifications service system. Usually it’s embedded system. Questions to ask: What types of notifications are we allowed to send? Should it be plugable (it’s easy to add new type of notification)? Should we build system as SaaS product or this system is only for internal usage? Do we need to implement notifications prioritization (multiple notifications are sent at the same time)? What’s expected system load? Functional requirements: Send notifications To be plugable (easy to add new type of notifications) To provide saas service (you also should be able to rate limit, user should not be able to get more than 5 promotional notifications per day) To prioritize notifications (process high priority messages first, for example password notifications) Non-functional requirements: High availability High load Design overview: Actually in case if system is small and expects low load all services can be wrapped into one monolith. But it’s not...

How to design tiny url system

Image
This post is a personal cheatsheet on how to design tiny url system. Questions to ask: What’s the length of short url? How many urls will come? What duration to support? What chars in url are allowed? Basic calculation: Let’s assume that we are allowed to use chars  a-z, A-Z, 0-9 (62 chars in total). Url with length of 1 char means we are able to generate 62 unique short urls, 2 chars - \(62^2\) urls, 3 chars - \(62^3\), etc… Let’s assume that we get x requests per second and the business requirement is to store the short versions of urls for 10 years. We get following equation: \(x\) requests per second * 60 sec * 60 mins * 24 hours * 365 days * 10 years = \(y\) We get following formula from equation: \(62^n > y => n = log_{62}(y)\), where n is the length of short url. n = 7 looks like a decent amount of unique urls (\(62^7\) = 3.52 trillions) System capacity: Let’s assume that we have have read/write ratio 200:1, number of generated links per month - 100 million. Write ...