Architecture

Scalability – Scale Out/In vs Scale Up/Down (Horizontal Scaling vs Vertical Scaling)

October 1, 2016 Architecture, Azure, Cloud Computing, Cloud Services, Horizontal Scaling, Performance, Reliability, Resilliancy, Scalability, Scale Down, Scale In, Scale Out, Scale Up, Software/System Design, Vertical Scaling, Virtualization No comments

When you work with Cloud Computing or normal Scalable highly available applications you would normally hear two terminologies called Scale Out and Scale Up or often called as Horizontal Scaling and Vertical Scaling.  I thought about covering basics and provide more clarity for developers and IT specialists.

What is Scalability?

Scalability is the capability of a system, network, or process to handle a growing amount of work, or its potential to be enlarged to accommodate that growth. For example, a system is considered scalable if it is capable of increasing its total output under an increased load when resources (typically hardware) are added.

A system whose performance improves after adding hardware, proportionally to the capacity added, is said to be a scalable system.

image

This will be applicable or any system such as :

  1. Commercial websites or Web application who have a larger user group and growing frequently,
  2. or An immediate need to serve a high number of users for some high profile event or campaign.
  3. or A streaming event that would need immediate  processing capabilities to serve streaming to larger set of users across certain region or  globally.
  4. or A immediate work processing or data processing that requires higher compute requirements that usual for a certain job.

Scalability can be measured in various dimensions, such as:

  • Administrative scalability: The ability for an increasing number of organizations or users to easily share a single distributed system.
  • Functional scalability: The ability to enhance the system by adding new functionality at minimal effort.
  • Geographic scalability: The ability to maintain performance, usefulness, or usability regardless of expansion from concentration in a local area to a more distributed geographic pattern.
  • Load scalability: The ability for a distributed system to easily expand and contract its resource pool to accommodate heavier or lighter loads or number of inputs. Alternatively, the ease with which a system or component can be modified, added, or removed, to accommodate changing load.
  • Generation scalability: The ability of a system to scale up by using new generations of components. Thereby, heterogeneous scalability is the ability to use the components from different vendors.

Scale-Out/In / Horizontal Scaling:

To scale horizontally (or scale out/in) means to add more nodes to (or remove nodes from) a system, such as adding a new computer to a distributed software application.

image

Pros:

  • Load is distributed to multiple servers
  • Even if one server goes down, there are servers to handle the requests or load.
  • You can add up more servers or reduce depending on the usage patterns or load.
  • Perfect for highly available web application or batch processing operations.

Cons:

  • You would need additional hardware /servers to support. This would increase increase infrastructure and maintenance costs.
  • You would need to purchase additional licenses for OS or required licensed software’s.

Scale-Up/Down/Vertical Scaling:

To scale vertically (or scale up/down) means to add resources to (or remove resources from) a single node in a system, typically involving the addition of CPUs or memory to a single computer.

image

Pros

  • Possibility to increase CPU/RAM/Storage virtually or physically.
  • Single system can serve all your data/work processing needs with additional hardware upgrade being done.
  • Minimal cost for upgrade

Cons

  • When you are physically or virtually maxed out with limit, you do not have any other options.
  • A crash could cause outages to your business processing jobs.

We discussed in detail about the both approach in Scalability, depending on the need you will have to choose right approach. Nowadays high availability of cloud computing platforms like Amazon AWS/Microsoft Azure etc., you have lots of flexible ways to Scale-Out or Scale-Up on a Cloud environment, which provides you with virtually unlimited resources, provided you are being capable to pay off accordingly.

Hope this information was helpful, please leave your comments accordingly if you find any discrepancies or you have any queries. 

Why SOA ?–Service Oriented Architecture

May 19, 2015 .NET, Architecture, FAQs, Interview Qns, KnowledgeBase, Microsoft, Service Oriented Architecture No comments

SOA starts with a simple idea – the concept of service. Services are unassociated, loosely coupled units of functionality that are self-contained. Each service implements at least one action, such as submitting an online application for an account, retrieving an online bank statement or modifying an online booking or airline ticket order.

There are multiple definitions for SOA:

The OASIS group and the Open Group have both created formal definitions.
OASIS’s Definition of Service Oriented Architecture
A paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains. It provides a uniform means to offer, discover, interact with and use capabilities to produce desired effects consistent with measurable preconditions and expectations.
The Open Group’s Definition of Service Oriented Architecture
Service-Oriented Architecture (SOA) is an architectural style that supports service-orientation. Service-orientation is a way of thinking in terms of services and service-based development and the outcomes of services. A service is a logical representation of a repeatable business activity that has a specified outcome (e.g., check customer credit, provide weather data, consolidate drilling reports)

The purpose of SOA is to allow users to combine together fairly large chunks of functionality to form ad hoc applications built almost entirely from existing software services. The larger the chunks, the fewer the interfaces required to implement any given set of functionality; however, very large chunks of functionality may not prove sufficiently granular for easy reuse. Each interface brings with it some amount of processing overhead, so there is a performance consideration in choosing the granularity of services.

SOA as an architecture relies on service-orientation as its fundamental design principle. If a service presents a simple interface that abstracts away its underlying complexity, then users can access independent services without knowledge of the service’s platform implementation.

Horizontal Layers of SOA

SOA-based solutions endeavour to enable business objectives while building an enterprise-quality system. SOA architecture is viewed as five horizontal layers:

  1. Consumer Interface Layer – These are GUI for end users or apps accessing apps/service interfaces.
  2. Business Process Layer – These are choreographed services representing business use-cases in terms of applications.
  3. Services – Services are consolidated together for whole-enterprise in-service inventory.
  4. Service Components – The components used to build the services, such as functional and technical libraries, technological interfaces etc.
  5. Operational Systems – This layer contains the data models, enterprise data repository, technological platforms etc.

Cross Cutting – Vertical Layers of SOA

There are four cross-cutting vertical layers, each of which are applied to and supported by each of the following horizontal layers:

  1. Integration Layer – starts with platform integration (protocols support), data integration, service integration, application integration, leading to enterprise application integration supporting B2B and B2C.
  2. Quality of Service – Security, availability, performance etc. constitute the quality of service parameters which are configured based on required SLAs, OLAs.
  3. Informational – provide business information.
  4. Governance – IT strategy is governed to each horizontal layer to achieve required operating and capability model.

Benefits:

The use of services provides major benefits:

  • In contrast to the use of large applications, which tend to be “information silos” that cannot readily exchange information with each other, the use of finer-grained software services gives freer information flow within and between enterprises. Integrating major applications is often expensive. SOA can save integration costs.
  • Organizing internal software as services makes it easier to expose its functionality externally. This leads to increased visibility that can have business value as, for example, when a logistics company makes the tracking of shipments visible to its customers, increasing customer satisfaction and reducing the costly overhead of status enquiries.
  • Business processes are often dependent on their supporting software. It can be hard to change large, monolithic programs. This can make it difficult to change the business processes to meet new requirements (arising, for example, from changes in legislation) or to take advantage of new business opportunities. A service-based software architecture is easier to change – it has greater organizational flexibility, enabling it to avoid penalties and reap commercial advantage. (This is one of the ways in which SOA can make an enterprise more “agile”.)

[Quote: TheOpenGroup.org]

Now to coming to the question “Why SOA?”, I believe mostly it is answered.

In summary  SOA helps you with:

  • Reuse and composition. This is particularly powerful for creating new business processes quickly and reliably.
  • Recomposition. The ability to alter existing business processes or other applications based on service aggregation.
  • The ability to incrementally change the system. Switching service providers, extending services, modifying service providers and consumers. All of these can be done safely, due to well-controlled coupling.
  • The ability to incrementally build the system. This is especially true of SOA-based integration.

Reference Sources: