What is software architecture?
Software architecture is the high-level structure of a software system: its major components, their responsibilities, the relationships between them, and the principles that guide important design decisions.
Questions 1-25: Architecture Fundamentals, Scalability, Availability & Performance.
Open a question for the full answer, code and interview guidance.
Software architecture is the high-level structure of a software system: its major components, their responsibilities, the relationships between them, and the principles that guide important design decisions.
System design is the process of defining how a system will satisfy functional and non-functional requirements. It covers components, APIs, data storage, communication, scaling, caching, security, reliability, and deployment considerations.
Software architecture deals with system-wide structure and high-impact decisions, such as service boundaries, dependency direction, databases, communication styles, and deployment models. Software design also includes lower-level decisions inside those boundaries.
Functional requirements describe what the system must do, such as creating orders, authenticating users, processing payments, or generating reports.
Quality attributes are measurable or observable characteristics that describe how well a system operates. Common examples include performance, scalability, availability, reliability, security, maintainability, testability, and usability.
Scalability is a system's ability to handle increased workload by adding or improving resources while maintaining acceptable service levels.
Vertical scaling increases the capacity of one machine, for example by adding CPU, memory, or faster storage. Horizontal scaling adds more machines or application instances and distributes work among them.
Availability is the proportion of time a system is able to provide its intended service. It is commonly expressed as a percentage over a defined period, such as 99.9% monthly availability.
Reliability is the ability of a system to perform correctly and consistently over time under stated conditions. A service can be available but unreliable if it frequently returns incorrect results.
Fault tolerance is the ability of a system to continue providing an acceptable level of service when one or more components fail.
Resilience is the ability of a system to withstand failures, recover from them, and continue operating at an acceptable level. Distributed systems must expect network delays, partial failures, unavailable dependencies, and duplicate operations.
Graceful degradation means preserving the most important functionality when a non-critical component is unavailable instead of failing the entire request or application.
A Single Point of Failure is a component whose failure can make the entire required service unavailable. It may be an application server, database, network device, authentication service, or another critical dependency.
Redundancy means providing additional instances, copies, or paths so the system can continue operating when a component fails.
Load balancing distributes incoming traffic or work across multiple healthy service instances. It helps use capacity efficiently and can prevent one instance from becoming overloaded.
A stateless application does not require a particular server instance to remember client-specific state between requests. Any healthy instance can normally process the next request.
A stateful application keeps information that affects later interactions within a particular process, server, or session. Examples can include in-memory sessions, long-lived connections, or local workflow state.
Session affinity routes a client's subsequent requests to the same server instance, often because that instance holds local session state.
Latency is the time required for an operation or request to complete, usually measured from the client's or caller's perspective. It can include network time, queueing, processing, database access, serialization, and downstream service calls.
Throughput is the amount of work a system completes per unit of time, such as requests per second, messages per second, or transactions per minute.
Percentile latency shows how response times are distributed. p50 is the median: 50% of observations are at or below that value. p95 and p99 describe the response time below which 95% and 99% of observations fall.
Capacity planning estimates the resources required to handle expected workload while meeting performance and reliability targets. It uses traffic volume, growth, request cost, storage growth, peak factors, and safety margins.
A bottleneck is the component or resource that limits the overall capacity or performance of a system. Common bottlenecks include CPU, memory, database locks, connection pools, disk I/O, network bandwidth, and slow external services.
Backpressure is a mechanism for preventing producers from overwhelming consumers when work arrives faster than it can be processed. Instead of accepting unlimited work, the system slows, buffers within limits, rejects, or signals producers to reduce the rate.
Start by clarifying functional requirements, users, traffic, data volume, consistency needs, availability targets, security constraints, and the most important quality attributes. State assumptions when information is missing.