Search anything:

Cloud Design Patterns

Binary Tree book by OpenGenus

Open-Source Internship opportunity by OpenGenus for programmers. Apply now.

A Cloud Design Pattern as defined by cloud computing experts are a general reusable solution to commonly occuring problems in cloud architecting.They are a collection of solutions and design ideas for using cloud technology to solve common system design problems. The cloud design patterns are used to solve common problems and they are a set of reusable solutions to issues that cloud builders may have during their work.

Table of content:

  1. Why we need Cloud Design Patterns?
  2. Some Common Cloud Design Patterns
  3. SnapShot Pattern
  4. Stamp Pattern
  5. Scale Up Pattern
  6. Scale Out Pattern
  7. NFS Sharing Pattern
  8. State Sharing Pattern
  9. Write Proxy Patterns
  10. DB Replication Pattern
  11. Read Replica Pattern
  12. Deep Health Check Pattern

Why we need Cloud Design Patterns?

Building cloud applications require that each level of the application is well built to handle its task. If the bottom layers are imperfectly built then the application will fail. Cloud Design Patterns help engineers solve this problem reliably and securely with a proven solution thus saving time and bad outcomes.

The cloud design patterns help companies and industries to boost their cloud architecture to develop highly scalable applications that are easy to migrate . It also helps them unlock incredible value in a large scale.

Some of the cloud design patterns are mentioned below

Some Common Cloud Design Patterns

These are the cloud design patterns we are going to discuss

  • SnapShot Pattern
  • Stamp Pattern
  • Scale Up Pattern
  • Scale Out Pattern
  • NFS Sharing Pattern
  • State Sharing Pattern
  • Write Proxy Patterns
  • DB Replication Pattern
  • Deep Health Check Pattern

SnapShot Pattern


A snapshot is the backup copy of data at a given point of time.Snapshots allow users to copy the data of a virtual server along with the other data.This pattern ensures that data is safe , this pattern is suitable when performing program update checks as well as coping with the OS as well as the data.

In the image we are creating a snapshot of the data in our server which can later be used for recovery purposes or attached to other servers.

Stamp Pattern


Setting up a server from scratch that is installing all dependencies , doing all the configuration takes up a lot of labour and time. Cloud Providers allow users to create a machine image of the already configured server which can be later used to setup a new server with the same dependencies and configuration and data. This helps reduce the physical labour , expense and time taken by developers.

In the image we create an AMI (a special image ) of the server which we can later on use to deploy similar servers in the same state.

Scale Up Pattern


Initially it is difficult to estimate the amount of server resources required to after deploying an application to production from development. The server will not perform appropriately if the server resources are insufficient , thus developers are allowed to modify the virtual server specifications as needed even after launching the server.

As depicted in the image for larger loads we pump up the server resources like memory or CPU which results in more computational power.

Scale Out Pattern


As the traffic increases there will be a requirement to provision multiple virtual servers running the application to distribute the requests and process them between the servers using a loadbalancer. This allows the traffic to be evenly distributed and not spike up suddenly.

When there is a need to distribute the load , as shown by the image the number of servers are increased and a loadbalancer is attached in front of them which handles the load distribution.

NFS Sharing Pattern


When multiple servers are used to distribute loads there is a requirement to synchronize content between each of the servers. This pattern helps write identical content between many servers in real time . The servers use a nfs client to connect to a common nfs server in which data is updated in real time.

As depicted by the image all the severs share a common volume , a nfs volume (which has very fast read write) so there is real time update of data in each server and all the servers share the same volume.

State Sharing Pattern


State information like information that is unqiue to an user can be used to generate content for a user , however if this state is shared between multiple servers under a loadbalancer it could cause problems like the loss of state information. Cloud providers supply high-durability shared data store (memory/disk) where the state information can be stored. This makes the servers stateless so that it does not contain any state information and any new server references the data store.

All the servers in the image write to a common database , this ensures that even if a server crashes the data is persisted across. The servers write to the kvs database.

Write Proxy Patterns


Instead of passing data directly to Internet storage from a client the data is first passed to a virtual server which forwards it to the Internet storage. This maintains redundancy but also ensures that there are no performance issues when writing large amounts of data to the Internet storage.

Here in the image data is stored in the S3 by passing the data through the server initially which is how the write proxy pattern works.

DB Replication Pattern


This pattern allows developers to perform replication of the database across multiple geographical locations. This pattern prevents data loss and and maintain data access availability. This pattern has become increasingly widespread and common.

The database is replicated in different region as shown in the image. This is helpful as people in region B can rely on the replicated database in region B instead of sending it all the way to region A.

Read Replica Pattern


Often when the frequency of access to the database is very high , the database resources are overwhelmed. In such cases the database can be scaled out by distributing the reading of the database into multiple Read Replicas. The Read Replicas follow the writings of the master database , this primirarily reduces the load on the master database.

The image depicts how database relicasets works . Reading of data is done through the read replicas of the databases and when data is written the read replcas replicates that data from the write database.

Deep Health Check Pattern


Health Check functions in the loadbalancers can be used to evaluate the status of application . Cloud Providers have an option to configure alerts and messages to teh cloud admins if the server is unhealthy which helps them resolve issues quickly.

As shown by the image , the loadbalancer performs health checks on the web servers by requesting a particular file. This is common for example in case of nginx . If the check fails the loadbalancer datermines that the server is unhealthy currently.

Cloud Design Patterns
Share this