<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Software Architecture/Design Essentials - Medium]]></title>
        <description><![CDATA[Essentials of software architecture and design - Medium]]></description>
        <link>https://medium.com/software-architecture?source=rss----ec188bbff89a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Software Architecture/Design Essentials - Medium</title>
            <link>https://medium.com/software-architecture?source=rss----ec188bbff89a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:00:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/software-architecture" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Types of Cohesion]]></title>
            <link>https://medium.com/software-architecture/types-of-cohesion-6d1b06918acd?source=rss----ec188bbff89a---4</link>
            <guid isPermaLink="false">https://medium.com/p/6d1b06918acd</guid>
            <category><![CDATA[cohesion]]></category>
            <category><![CDATA[sequential-cohesion]]></category>
            <category><![CDATA[logical-cohesion]]></category>
            <category><![CDATA[functional-cohesion]]></category>
            <category><![CDATA[cohesion-and-coupling]]></category>
            <dc:creator><![CDATA[Ravi]]></dc:creator>
            <pubDate>Sat, 31 Dec 2022 05:54:37 GMT</pubDate>
            <atom:updated>2022-12-31T05:55:55.647Z</atom:updated>
            <content:encoded><![CDATA[<h4>Modularity Fundamentals</h4><p>In a previous article titled <a href="https://medium.com/software-architecture/what-is-modularity-1480ddb84b51"><em>What is Modularity?</em></a><em> </em>we briefly explained that <em>high cohesion</em> and <em>low coupling</em> indicate a well-designed modular decomposition. Both cohesion and coupling come in several types. Here, we explain the various types of cohesion.</p><h3>But First, Remind me — What is Cohesion?</h3><p>As explained in the <a href="https://medium.com/software-architecture/what-is-modularity-1480ddb84b51#2a15">previous article</a>, a module is said to be <strong><em>highly cohesive</em></strong> if its constituents are strongly related and work towards a common goal.</p><p>Similarly, the modules have <em>low coupling</em> if they have minimal and simple interconnections. Both cohesion and coupling are measures of modularity and a “high” of one is often correlated with a “low” of the other as shown in the figure below, so it’s difficult to talk about one without mentioning the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FtZFNbuwPg1uB5e8AluGg.png" /><figcaption>Figure 1: (i) Poor design — low cohesion and high coupling (ii) Improved design — high cohesion and low coupling</figcaption></figure><p>In design (i) shown above, order management function is distributed across multiple modules. In design (ii), it is brought together in a single highly cohesive Order Management module. High cohesion makes it easier to understand and maintain the module’s design and source code. For instance, in the particular case of the Order Management (OM) module, high cohesion has the following benefits:</p><ul><li>It’s easier to understand and reason about the module’s functional and technical behaviors.</li><li>It’s easier test the module independently. Apart from unit tests that validate business logic, you can test the functional behaviors by exercising the module’s interfaces (say, API).</li><li>Any changes in order management behaviors is likely to impact only the Order Management module. Also, it is easier to build expertise in the module as all related constituents are together. Introducing enhancements and fixing bugs should become easier, both due to limited impact and expertise.</li></ul><h3>The Spectrum of Choices of Cohesion</h3><p>Cohesion comes in various types or degrees. The figure below depicts them on a graded scale comprising the least desirable type to the most desirable one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3G9_1rEuKmHg8WQ2AfUHAw.png" /><figcaption>Figure 2: The spectrum of Cohesion types from the least desirable/undesirable to the most desirable</figcaption></figure><p>The following subsections describe the types.</p><h4>Coincidental Cohesion</h4><p>A module exhibits coincidental cohesion if its constituents are arbitrarily grouped together for no particular reason and perform unrelated tasks.</p><p>Coincidental cohesion is the worst form of cohesion and is best avoided except in the the simplest of the applications.</p><h4>Logical Cohesion</h4><p>A module is <em>logically cohesive </em>if its constituents are grouped together because they perform <em>logically</em> similar tasks.</p><p>A couple of examples:</p><ul><li>A Utilities module, which groups utilities/helpers for the entire application.</li><li>A Transaction module, which groups components that perform different kinds of business transactions such as creating and managing users, customers, products, orders, payments, etc.</li></ul><p>Logical cohesion should generally be avoided. However, it can be useful sometimes when used in conjunction with higher degrees of cohesion. You could group solution domain constructs like <em>layers, utilities</em>, and so on, in <em>logically cohesive </em>sub-modules under a <em>functionally cohesive</em> parent module, as illustrated in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*E8B_zvtyPTafdK78Q6e9rQ.png" /><figcaption>Figure 3: Logically cohesive “Utilities” and “Data Access” sub-modules under functionally cohesive “Order Management” and “Product Information Management” parent modules</figcaption></figure><p>At a source code level, the modules shown in the figure above may be represented as packages/namespaces of the following form:</p><ul><li>com.mycompany.ecommerce.ordermanagement.utilities (Java) /MyCompany.Ecommerce.OrderManagement.Utilities (C#)</li><li>com.mycompany.ecommerce.productinfomanagement.utilities (Java) / MyCompany.Ecommerce.ProductInfoManagement.Utilities (C#)</li></ul><h4>Temporal Cohesion</h4><p>A module exhibits <em>temporal cohesion</em> if its constituents are grouped together only because they are related in time. The constituents of a temporally cohesive module are only weakly related to each other.</p><p>An Initializer or System Startupmodule that encapsulates and performs initialization/startup tasks for the entire system, is an example of a temporally cohesive module. It is shown in design (i) in the following figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_KhHzGn-cjgTF4GeSpJy-g.png" /><figcaption>Figure 4: (i) Temporally cohesive Startup module that performs startup tasks for other modules, (ii) A better design that delegates startup to respective modules</figcaption></figure><p>Design (ii) in the above figure shows an improved and more maintainable design, where the module coordinates the startup process, but delegates module startup to respective tasks in other modules.</p><h4>Procedural Cohesion</h4><p>A module exhibits <em>procedural cohesion</em> if its constituents are grouped together because they are related by order of execution (although they don’t share data).</p><p>A good example is an “Payments File Processor” module that performs the following tasks in sequence:</p><ul><li>Check file permissions.</li><li>Reads the file to extract records. Each record represents a received payment.</li><li>Computes cumulative payments.</li><li>Prepares a payments report.</li><li>Publishes the report.</li><li>Sends email to announce availability of the report.</li></ul><p>Procedural cohesion is a moderate form of cohesion.</p><h4>Communication Cohesion</h4><p>A module exhibits <em>communication cohesion</em> if its constituents are grouped together because they operate on the same inputs and outputs, such as a file, a record in the database, or a data structure.</p><p>For example, consider a hypotheticalBill Items Readermodule that performs a bunch of tasks on the same set of bills:</p><ul><li>Reads recent bills to extracts items.</li><li>Transforms the bills for further processing.</li><li>Generates a periodic report based on the bills.</li><li>Computes and stores cumulative bill stats for a dashboard.</li></ul><h4>Sequential Cohesion</h4><p>A module exhibits <em>sequential cohesion</em> if its constituents are grouped together because each constituent’s output is used as input by the next one.</p><p>The following figure illustrates a Data Processing module that exhibits sequential cohesion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xs7A2AdvMPSdTH4Sz8lRkg.png" /><figcaption>Figure 5: An example module exhibiting sequential cohesion</figcaption></figure><p>The constituents of the Data Processing module in the example above are grouped together because they perform the following tasks in a sequence:</p><ul><li>The File Reader component reads the file, then passes the content to the Format Translator component.</li><li>The Format Translator translates the format and then sends the content to the File Compressor.</li><li>The File Compressor compresses the files and passed the compressed file to the File Uploader.</li><li>The File Uploader then uploads the compressed file to the Cloud Object Storage destination.</li></ul><p>Sequential cohesion is a relatively strong form of cohesion. Functional cohesion, which is discussed in the next section, is even better.</p><h4>Functional Cohesion</h4><p>A module is <em>functionally cohesive</em> if its constituents are grouped together because they work together towards fulfilling a single, common business function.</p><p>In the example shown in the figure below, each module is responsible for a single business function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*VlAeHPmzRMg_dctm-Y4sZw.png" /><figcaption>Figure 6: Each module serves a particular business function and all its constituents work towards the same goal. Each module exhibits functional cohesion.</figcaption></figure><p>Assuming that each constituent work towards the same business function that the module serves, each of the modules shown above is functionally cohesive.</p><p>This a strong form of cohesion and among the best.</p><h3>Conclusion</h3><p>There are various degrees of cohesion ranging from <em>coincidental cohesion</em> where the constituents are more or less unrelated to each other and perform unrelated tasks, to <em>functional cohesion</em> they are strongly related to each other and work together towards a shared business goal.</p><p>In most cases, you should aim for making your modules functionally cohesive. If you can’t - explore using lower forms of cohesion like <em>sequential</em>, <em>communication</em>, procedural, <em>temporal</em> and <em>logical</em>. You could also use them in conjunction — say, functional cohesion for a parent module like com.mycompany.ecommerce.<strong>ordermanagement</strong> and logical cohesion for a child module like com.mycompany.ecommerce.ordermanagement.<strong>utilities</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d1b06918acd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-architecture/types-of-cohesion-6d1b06918acd">Types of Cohesion</a> was originally published in <a href="https://medium.com/software-architecture">Software Architecture/Design Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Modularity?]]></title>
            <link>https://medium.com/software-architecture/what-is-modularity-1480ddb84b51?source=rss----ec188bbff89a---4</link>
            <guid isPermaLink="false">https://medium.com/p/1480ddb84b51</guid>
            <category><![CDATA[cohesion]]></category>
            <category><![CDATA[software-modularity]]></category>
            <category><![CDATA[modularity]]></category>
            <category><![CDATA[loosecoupling]]></category>
            <category><![CDATA[coupling]]></category>
            <dc:creator><![CDATA[Ravi]]></dc:creator>
            <pubDate>Wed, 28 Dec 2022 04:51:11 GMT</pubDate>
            <atom:updated>2022-12-29T03:38:18.955Z</atom:updated>
            <content:encoded><![CDATA[<h4>Modularity Fundamentals</h4><p>This article provides a quick overview of <em>software</em> <em>modularity </em>and related concepts like coupling and cohesion and design-time vs. run-time modularity.</p><p><strong>Table of Contents:</strong></p><p>— <a href="#ad89">Divide and Conquer Using Modular and Hierarchical Decomposition</a><br>— <a href="#2a15">Coupling and Cohesion</a><br>— <a href="#23ae">Design-Time vs. Runtime Modularity</a><br> — <a href="#3549">Conclusion</a></p><h3>Divide and Conquer Using Modular and Hierarchical Decomposition</h3><p>Say, you were tasked with designing an <em>online retail application</em>. Where do you even start?</p><p>An <em>online retail application</em> is a very complex system covering a large variety of interconnected functions and parts. Such complexity can be hard to deal with and a common way of tackling such complexity is to “<em>divide and conquer</em>”, which boils down to decomposing the system into <em>modular</em> and <em>hierarchical</em> subsystems and components.</p><p>For instance, an <em>online retail application</em> may be broken down into self-contained (and interconnected) building blocks/subsystems like “<em>Order Management</em>”, “<em>Product Information management</em>”, “<em>Payments &amp; Billing</em>”, etc., as depicted in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2FDWNBAbIlEtM-nP1f3lPQ.png" /><figcaption>Tackling Complexity through Modular and Hierarchical Decomposition</figcaption></figure><p>Each of the top-level subsystems may be divided further into still smaller sub-systems, as shown for the “Order Management” subsystem in the above figure.</p><p>You could say that those subsystems are the <em>modules</em> of the system. In this broader sense, modules can be seen as building blocks of a system. Each module groups a set of components, which work together to serve a common purpose.</p><p>Another way of looking at modules is that they group related source code. For example, if you are building the example application in Java, you might organize the Java classes contained in the “Order Management” and “Order Entry” modules under packages of the form:</p><ul><li>com.&lt;your-company&gt;.ecommerce.ordermanagement</li><li>com.&lt;your-company&gt;.ecommerce.ordermanagement.orderentry</li></ul><h3>Coupling and Cohesion</h3><p>How do you know if modules are well-designed?</p><p>Among the major determinants are <em>high cohesion</em> and <em>low coupling. </em>If the constituents of the modules are strongly related and work together towards a common goal, they are <em>highly cohesive</em>. Similarly, if they have minimal interconnections, they are <em>loosely coupled</em>. The following figure illustrates the difference between a poor modular decomposition and a good one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TPHYcCbToJUT3D3_0Q020g.png" /><figcaption>(a) A poor design with low cohesion and high coupling (b) A better design with high cohesion and low coupling</figcaption></figure><p>In design (a) which exhibits <em>low cohesion</em> and <em>high coupling</em>, the modules are arranged in a way where the business functions are distributed among a number of highly interconnected modules. This design is harder to understand. It is also harder to maintain: a simple change in functionality may require simultaneous changes in multiple modules, and a change in one may trigger a ripple effect of changes in others. This is clearly not a good design.</p><p>In design (b) which exhibits <em>high cohesion</em> and <em>low coupling</em>, the modules exhibit functional cohesion — the constituents work together to perform a single business function, which is among the best forms of cohesion. They also have a much simpler coupling, where the “Order Management” module communicates with the “Product Information Management” module (say, by sending messages). This design is much easier to understand and maintain and is a big improvement over design (a).</p><p>Interestingly, low coupling and high cohesion often work as dual characteristics: high cohesion often correlates with low coupling and vice versa.</p><p>Also, coupling and cohesion come in various degrees, but we’ll cover that in another article.</p><h3>Design-Time vs. Runtime Modularity</h3><p>The modularity focus of the online retail application example discussed above was on <em>design-time</em> modularity, or in other words the application’s logical design. Design-time/logical modularity is about structuring a system/codebase into self-contained, cohesive modules with minimum interconnections.</p><p>Another form of modularity is runtime or physical modularity, which views modules as <em>units of deployment and dependencies</em>. It’s concerned with how the module constituents are packaged for deployment and/or managed at runtime. Java’s Modules feature which was added in Java 9, is an example of this form of modularity. OSGi is another example.</p><h3>Conclusion</h3><p>Modularity is a tool for tackling complexity in software. A well-designed modular decomposition leads to modules that exhibit high cohesion and low coupling. The focus of modular design may be a system’s logical design, or it may be its physical design.</p><h3>References and Further Reading</h3><ol><li><a href="https://www.osgi.org/resources/modularity/">https://www.osgi.org/resources/modularity/</a></li><li>“A Guide to Java 9 Modularity” by Christopher Franklin, <a href="https://www.baeldung.com/java-9-modularity">https://www.baeldung.com/java-9-modularity</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1480ddb84b51" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-architecture/what-is-modularity-1480ddb84b51">What is Modularity?</a> was originally published in <a href="https://medium.com/software-architecture">Software Architecture/Design Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Architecture vs. Design]]></title>
            <link>https://medium.com/software-architecture/software-architecture-vs-design-3576f229c6e7?source=rss----ec188bbff89a---4</link>
            <guid isPermaLink="false">https://medium.com/p/3576f229c6e7</guid>
            <category><![CDATA[software-architect]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Ravi]]></dc:creator>
            <pubDate>Sat, 24 Dec 2022 11:30:51 GMT</pubDate>
            <atom:updated>2022-12-26T02:43:22.569Z</atom:updated>
            <content:encoded><![CDATA[<h4>Fundamentals of Software Architecture</h4><p>How is <em>software architecture</em> different from <em>software design</em>? I’ll try to answer that age-old question based on my own decades-long experience.</p><h3>Architectural Concerns</h3><p><a href="https://en.wikipedia.org/wiki/Ralph_Johnson_(computer_scientist)">Ralph E Johnson</a> once famously concluded that “<em>Architecture is about the important stuff. Whatever that is.</em>” He was spot-on!</p><p>When I’m architecting a software product, my focus is usually on design aspects that have a <em>systemic</em> and <em>lasting</em> impact. The architectural concerns can vary from case to case, but to make it more tangible, let’s consider that you are architecting a microservices system. Your major architectural concerns may include the following and more:</p><ol><li>How are the system responsibilities divided among the different services so that the services are at the appropriate level of granularity, are easily reusable and exhibit high cohesion and loose coupling?</li><li>What API protocols (REST, gRPC, etc.) do the services support for application-to-service and service-to-service communications?</li><li>How are common functions like observability (monitoring, logging, log management, alerting, etc.) and security (SSL/TLS, authentication, authorization) handled in the services?</li><li>On what platform are the services deployed in? How are they scaled up/down or out/in? How will they be discovered?</li><li>What are the guiding principles that each service needs to adhere to (for fault tolerance, testability, reliability, performance, etc.)?</li></ol><p>These are only a few examples of architectural concerns you might have in this particular scenario. Depending on the context, there be more.</p><h3>Design Concerns</h3><p>While architectural concerns are important design concerns that have a <em>global/non-local</em> impact on a system, <strong><em>design concerns</em></strong> are those that are important but have more of a <em>local</em> impact.</p><p>In the same microservices scenario, the database schema and domain model of a particular service, among other things, may be considered software design concerns.</p><p>Also, keep in mind that what constitutes architecture vs. design is highly contextual. For example, when viewed in the context of the microservices system architecture discussed above, the structural design of a particular service may be considered <em>design</em>; However, if you were architecting a particular service, the service’s structural design may be considered architecture.</p><h3>Architecture vs. Design Patterns</h3><p>An easy way of understanding the difference between software architecture and design is to see how architectural patterns are different from design patterns.</p><p>Architectural patterns like <em>Tiered Architecture</em>, <em>Layered Architecture</em>, <em>Pipes-and-Filters</em>, <em>Microservices</em>, etc. affect the entire system. Design patterns like <em>Factory Method</em>, <em>Adapter</em>, <em>Observer</em>, etc., on the other hand, target a local section of the system.</p><h3>Conclusion</h3><p>Software architecture is about the important <em>non-local</em> design concerns of a system that have a <em>systemic</em> impact. Software design, on the other hand, is about <em>local</em> design concerns that usually have local impacts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3576f229c6e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-architecture/software-architecture-vs-design-3576f229c6e7">Software Architecture vs. Design</a> was originally published in <a href="https://medium.com/software-architecture">Software Architecture/Design Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vertical vs. Horizontal Scalability]]></title>
            <link>https://medium.com/software-architecture/vertical-vs-horizontal-scalability-7b12ed6a9a87?source=rss----ec188bbff89a---4</link>
            <guid isPermaLink="false">https://medium.com/p/7b12ed6a9a87</guid>
            <category><![CDATA[horizontal-scalability]]></category>
            <category><![CDATA[scaling-up]]></category>
            <category><![CDATA[vertical-scalability]]></category>
            <category><![CDATA[scale-out]]></category>
            <category><![CDATA[scalability]]></category>
            <dc:creator><![CDATA[Ravi]]></dc:creator>
            <pubDate>Sat, 24 Dec 2022 04:50:21 GMT</pubDate>
            <atom:updated>2022-12-24T04:52:06.362Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding that systems can scale vertically or horizontally, up or down, and out or in</h4><p>As defined in a <a href="https://medium.com/software-architecture/what-is-scalability-b403de11ae82">previous</a> post, <strong><em>scalability</em></strong><em> </em>is the ability of a system to do more or bigger work with an increase in system resources (CPUs/cores, memory, IOPS, etc.) or units (nodes, machines, etc.) — usually, without material impacting performance. Scalable systems may be <strong><em>vertically scalable</em></strong>, which means they can <strong><em>scale up </em></strong>and <strong><em>down</em></strong>. Or, they may be <strong><em>horizontally scalabl</em></strong>e, which means they can <strong><em>scale out</em></strong> and <strong><em>in</em></strong>. Or, they may be both vertically and horizontally scalable. This article explains all of these concepts.</p><h3>Vertical Scalability and Scale-Up/Down</h3><p>A system is said to be <strong><em>vertically scalable</em></strong> if increasing its resources enables it to do more work. For example, if a Web application can serve a larger number of concurrent requests if hosted on a bigger server (physical machine, virtual machine, container, etc.), it is <em>vertically scalable</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*rPcTtaKRMi4G7qjY5Ik7dA.png" /></figure><p>A vertically scalable system may be <strong><em>scaled</em></strong><em> </em><strong><em>up </em></strong>or<strong><em> down</em></strong><em>:</em></p><ul><li><strong><em>Scaling up</em></strong> refers to<strong><em> </em></strong>increasing the system’s capacity by increasing the resources. For instance, an increase in the underlying server’s CPUs/cores might enable a Web application to serve more concurrent requests.</li><li><strong><em>Scaling down</em></strong> refers to decreasing capacity by decreasing the resources.</li></ul><h3>Horizontal Scalability and Scale-Out/In</h3><p>A system is said to be <strong><em>horizontally scalable</em></strong> if increasing nodes/machines enables it to do more work. For example, in general, adding additional brokers to a Kafka cluster increases the cluster’s capacity, so it is horizontally scalable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*g7Fz0q8FyYkkMzHkBuz7zQ.png" /></figure><p>Horizontally scalable systems may <strong><em>scale</em></strong> <strong><em>out</em></strong> or <strong><em>in</em></strong>:</p><ul><li><strong><em>Scaling out</em></strong> refers to adding more nodes to increase capacity.</li><li><strong><em>Scaling in </em></strong>refers to reducing nodes to decrease capacity.</li></ul><h3>Linear Scalability and Scalability Factor</h3><p>A linearly scalable system is one whose capacity increases proportionately as its resources or units increase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*WS0guiuIvI-2Xfvi2YL7Kw.png" /></figure><p>Say, the maximum throughput of a given server application is 1000 transactions/second (TPS). Assume that doubling the underlying host’s memory and CPU cores enables it to support twice the throughput - 2000 TPS. Similarly, tripling the resources enables it to serve 3000 TPS. We can then say that the system is linearly scalable in terms of throughput - at least between 1000-3000 TPS.</p><p>A linearly scalable system is said to have a <em>scalability factor</em> of 1. The <strong><em>scalability factor</em></strong> refers to the factor by which capacity increases with an increase in resources/units.</p><p>Many systems that exhibit vertical or horizontal scalability are not linearly scalable: they have a scalability factor of less than 1. In other words, they exhibit <strong><em>sub-linear scalability</em></strong>.</p><p>Even if a system does exhibit linear scalability, it may not do so indefinitely — there may be an upper limit (or a “ceiling”) on how much it can scale up/out. Most systems also have a lower limit (or a “floor”) on how much they can scale down/in.</p><h3>Summary</h3><p>A horizontally scalable system can be scaled up or scaled down by increasing or decreasing its resources (CPU, memory, etc.).</p><p>Similarly, a vertically scalable system can be scaled out or in by increasing or decreasing the number of units (nodes, machines, etc.).</p><p>The factor by which a system scales up/down or out/in as resources/nodes increase/decrease is its scalability factor. As far as I’ve seen, very few scalable systems exhibit linear scalability — most systems exhibit sub-linear scalability. Superlinear scalability is rare.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b12ed6a9a87" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-architecture/vertical-vs-horizontal-scalability-7b12ed6a9a87">Vertical vs. Horizontal Scalability</a> was originally published in <a href="https://medium.com/software-architecture">Software Architecture/Design Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Scalability?]]></title>
            <link>https://medium.com/software-architecture/what-is-scalability-b403de11ae82?source=rss----ec188bbff89a---4</link>
            <guid isPermaLink="false">https://medium.com/p/b403de11ae82</guid>
            <category><![CDATA[scalable-applications]]></category>
            <category><![CDATA[scalable-systems]]></category>
            <category><![CDATA[scalability]]></category>
            <dc:creator><![CDATA[Ravi]]></dc:creator>
            <pubDate>Fri, 23 Dec 2022 06:42:43 GMT</pubDate>
            <atom:updated>2022-12-24T04:11:05.198Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding system scalability and how it is different from system performance?</h4><h3>Overview</h3><p><strong>S<em>calability</em></strong><em> </em>is the ability of a system to perform <em>more</em> or <em>larger</em> units of work — or, in other words, service <em>higher levels of loads -</em> by leveraging additional system resources or units/nodes. Implicit in this definition is that the higher load is serviced without adversely affecting performance.</p><p>What the “higher load” refers to depends on the context, but here are some examples:</p><ul><li>A larger number of <em>concurrent requests</em></li><li>A higher <em>rate of requests (</em>throughput)</li><li>A bigger <em>dataset</em></li><li>A larger <em>number of application objects</em></li></ul><p>Put another way, a system is <em>scalable</em> if increasing system <em>resources</em> (CPUs, memory, etc.) or <em>units</em> (nodes, machines, etc.) enables it to process higher loads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*LlKh3bS1DdisKhdcn0a6tg.png" /></figure><h3>Scalability vs. Performance</h3><p>The terms <em>performance</em> and <em>scalability</em> are sometimes used interchangeably, but they are distinctly different.</p><ul><li><em>Performance</em>, in the narrow sense of the word, is about the “speed” of execution (such as an HTTP request) in the face of a given load.</li><li><em>Scalability</em>, on the other hand, is about the system’s ability to maintain its performance with increasing loads (such as concurrent users, operations, data volume, etc.) using more and more resources.</li></ul><p>As such, improving a system’s performance may or may not improve its scalability and vice versa.</p><p>Note that the term performance is also sometimes used in a broader sense to refer to “<em>more or larger units of work”</em>, as done by Werner Vogels in <a href="https://www.allthingsdistributed.com/2006/03/a_word_on_scalability.html">this</a> article.</p><h3>References</h3><ol><li>Systems Performance: Enterprise and the Cloud, by Brendan Gregg, Published by Prentice Hall, 2013</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b403de11ae82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-architecture/what-is-scalability-b403de11ae82">What is Scalability?</a> was originally published in <a href="https://medium.com/software-architecture">Software Architecture/Design Essentials</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>