SlideShare a Scribd company logo
8 Cloud Design Patterns you
ought to know
Taswar Bhatti
System/Solutions Architect at Gemalto (Canada)
Microsoft MVP
Ponder
• For every 25 percent increase in problem complexity, there is a 100
percent increase in solution complexity.
• There is seldom one best design solution to a software problem.
• If cars were like software, they would crash twice a day for no reason,
and when you called for service, they’d tell you to reinstall the engine.
Who am I
• Taswar Bhatti – Microsoft MVP since 2014
• Global Solutions Architect/System Architect at Gemalto
• In Software Industry since 2000
• I know Kung Fu (Languages)
What I am not
8 cloud design patterns you ought to know - Update Conference 2018
Agenda
• What are Patterns?
• The External Configuration Pattern
• The Cache Aside Pattern
• The Federated Identity Pattern
• The Valet Key Pattern
• The Gatekeeper Pattern
• The Circuit Breaker Pattern
• The Retry Pattern
• The Strangler Pattern
• Demo
• Questions
Bad Design
Bad Design
Bad Design
Bad Design
Bad Design
Feature doesn’t make sense????
Anger
Bad day at work
Happy family
Next day at work
Ship it
Customer Feature didn’t make sense
Bad Design?
Itunes when I use it
8 cloud design patterns you ought to know - Update Conference 2018
What are Patterns?
• General reusable solution to a recurring problem
• A template on how to solve a problem
• Best practices
• Patterns allow developers communicate with each other in well
known and understand names for software interactions.
External Configuration Pattern
External Configuration Pattern
• Helps move configuration information out of the application
deployment
• This pattern can provide for easier management and control of
configuration data
• For sharing configuration data across applications and other
application instances
Typical Application
Storing Configuration in file
Multiple application
Problems
• Configuration becomes part of deployment
• Multiple applications share the same configuration
• Hard to have access control over the configuration
External Configuration Pattern
When to use the pattern
• When you have shared configuration, multiple application
• You want to manage configuration centrally by DevOps
• Provide audit for each configuration
When not to use
• When you only have a single application there is no need to use this
pattern it will make things more complex
Cloud Solution Offerings
• Azure Key Vault
• Vault by Hashicorp
• AWS KMS
• Keywhiz
Demo KeyVault
Cache Aside Pattern
Cache Aside Pattern
• Load data on demand into a cache from datastore
• Helps improve performance
• Helps in maintain consistency between data held in the cache and
data in the underlying data store.
Typical Application
Cache Aside Pattern
When to use the pattern
• Resource demand is unpredictable.
• This pattern enables applications to load data on demand
• It makes no assumptions about which data an application will require
in advance
When not to use
• Don’t use it for data that changes very often
Things to consider
• Sometimes data can be changed from outside process
• Have an expiry for the data in cache
• When update of data, invalidate the cache before updating the data
in database
• Pre populate the data if possible
Cloud Offerings
• Redis (Azure and AWS)
• Memcache
• Hazelcast
• Elastic Cache (AWS)
Federated Identity Pattern
Federated Identity Pattern
• Delegate authentication to an external identity provider.
• Simplify development, minimize the requirement for user
administration
• Improve the user experience of the application
• Centralized providing MFA for user authentication
Typical Application
Problem
Problem
• Complex development and maintenance (Duplicated code)
• MFA is not an easy thing
• User administration is a pain with access control
• Hard to keep system secure
• No single sign on (SSO) everyone needs to login again to different
systems
Federated Identity Pattern
When to use
• When you have multiple applications and want to provide SSO for
applications
• Federated identity with multiple partners
• Federated identity in SAAS application
When not to use it
• You already have a single application and have custom code that
allows you to login
Things to consider
• The identity Server needs to be highly available
• Single point of failure, must have HA
• RBAC, identity server usually does not have authorization information
• Claims and scope within the security auth token
Cloud Offerings
• Azure AD
• Gemalto STA and SAS
• Amazon IAM
• GCP Cloud IAM
Valet Key Pattern
Valet Key Pattern
• Use a token that provides clients with restricted direct access to a
specific resource
• Provide offload data transfer from the application
• Minimize cost and maximize scalability and performance
Typical Application
Client App Storage
Problem
Client App Storage
Client
Client Client
Client
Valet Key Pattern
Client App
Generate Token
Limited Time
And Scope
Storage
When to use it
• The application has limited resources
• To minimize operational cost
• Many interaction with external resources (upload, download)
• When the data is stored in a remote data store or a different
datacenter
When not to use it
• When you need to transform the data before upload or download
Cloud Offerings
• Azure Blob Storage
• Amazon S3
• GCP Cloud Storage
Gatekeeper Pattern
Gatekeeper Pattern
• Using a dedicated host instance that acts as a broker between clients
and services
• Protect applications and services
• Validates and sanitizes requests, and passes requests and data
between them
• Provide an additional layer of security, and limit the attack surface of
the system
Typical Application
Problem
Gatekeeper Pattern
When to use it
• Sensitive information (Health care, Authentication)
• Distributed System where perform request validation separately
When not to use
• Performance vs security
Things to consider
• WAF should not hold any keys or sensitive information
• Use a secure communication channel
• Auto scale
• Endpoint IP address (when scaling application does the WAF know
the new applications)
Circuit Breaker Pattern
Circuit Breaker Pattern
• To handle faults that might take a variable amount of time to recover
• When connecting to a remote service or resource
Typical Application
Problem
Client
Circuit
Breaker
Api
Closed State
Timeout
Closed State
Open State
Half Open State
After X Retry
Closed State
Circuit Breaker
When to use it
• To prevent an application from trying to invoke a remote service or
access a shared resource if this operation is highly likely to fail
• Better user experience
When not to use
• Handling access to local private resources in an application, such as
in-memory data structure
• Creates an overhead
• Not a substitute for handling exceptions in the business logic of your
applications
Libraries
• Polly (http://www.thepollyproject.org/)
• Netflix (Hystrix) https://github.com/Netflix/Hystrix/wiki
Retry pattern
Retry Pattern
• Enable an application to handle transient failures
• When the applications tries to connect to a service or network
resource
• By transparently retrying a failed operation
Typical Application
Network Failure
Retry Pattern
• Retry after 2, 5 or 10 seconds
When to use it
• Use retry for only transient failure that is more than likely to resolve
themselves quickly
• Match the retry policies with the application
• Otherwise use the circuit break pattern
When not to use it
• Don’t cause a chain reaction to all components
• For internal exceptions caused by business logic
• Log all retry attempts to the service
Libraries
• Roll your own code
• Polly (http://www.thepollyproject.org/)
• Netflix (Hystrix) https://github.com/Netflix/Hystrix/wiki
Demo Retry
Strangler Pattern
Strangler Pattern
• Incrementally migrate a legacy system
• Gradually replacing specific pieces of functionality with new
applications and services
• Features from the legacy system are replaced by new system features
eventually
• Strangling the old system and allowing you to decommission it
Monolith Application
Strangler Pattern
When to use
• Gradually migrating a back-end application to a new architecture
When not to use
• When requests to the back-end system cannot be intercepted
• For smaller systems where the complexity of wholesale replacement
is low
Considerations
• Handle services and data stores that are potentially used by both new
and legacy systems.
• Make sure both can access these resources side-by-side
• When migration is complete, the strangler façade will either go away
or evolve into an adaptor for legacy clients
• Make sure the façade doesn't become a single point of failure or a
performance bottleneck.
Questions?
Taswar Bhatti
System Solutions Architect (Gemalto)
Microsoft MVP
http://taswar.zeytinsoft.com
@taswarbhatti
Credits
• For the background
• www.Vecteezy.com

More Related Content

PPTX
Azure Reference Architectures
PPTX
Cloud Design Patterns - Hong Kong Codeaholics
PPTX
Cloud Design Patterns
PPTX
Managing your secrets in a cloud environment
PPTX
Azure Key Vault - Getting Started
PDF
Global azure virtual 2021 - Azure Lighthouse
PPTX
Tokyo azure meetup #8 - Azure Update, August
PDF
CSF18 - Securing the Cloud - Karim El-Melhaoui
Azure Reference Architectures
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns
Managing your secrets in a cloud environment
Azure Key Vault - Getting Started
Global azure virtual 2021 - Azure Lighthouse
Tokyo azure meetup #8 - Azure Update, August
CSF18 - Securing the Cloud - Karim El-Melhaoui

What's hot (20)

PDF
[RightScale Webinar] Architecting Databases in the cloud: How RightScale Doe...
PPTX
Azure SQL DB V12 at your service by Pieter Vanhove
PDF
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
PPTX
Azure governance
PPTX
Digitally Transform (And Keep) Your On-Premises File Servers
PPTX
Azure Networking - The First Technical Challenge
PDF
Flux QL - Nexgen Management of Time Series Inspired by JS
PPTX
Tokyo Azure Meetup #4 - Build 2016 Overview
PPTX
2 Speed IT powered by Microsoft Azure and Minecraft
PPTX
Performance Optimization of Cloud Based Applications by Peter Smith, ACL
PDF
Azure Penetration Testing
PDF
Scala Security: Eliminate 200+ Code-Level Threats With Fortify SCA For Scala
PDF
Slashing Your Cloud Risk: 3 Must-Do's
PPTX
Trust No-One Architecture For Services And Data
PDF
Microsoft azure - the cloud for modern business
PPTX
Shared Security Responsibility for the Azure Cloud
PDF
Webinar: Inside Apache Solr 5
PDF
CSF18 - External Collaboration with Azure B2B - Sjoukje Zaal
PPTX
Office Track: SharePoint Apps for the IT Pro - Thomas Vochten
PPTX
Enter The Matrix Securing Azure’s Assets
[RightScale Webinar] Architecting Databases in the cloud: How RightScale Doe...
Azure SQL DB V12 at your service by Pieter Vanhove
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
Azure governance
Digitally Transform (And Keep) Your On-Premises File Servers
Azure Networking - The First Technical Challenge
Flux QL - Nexgen Management of Time Series Inspired by JS
Tokyo Azure Meetup #4 - Build 2016 Overview
2 Speed IT powered by Microsoft Azure and Minecraft
Performance Optimization of Cloud Based Applications by Peter Smith, ACL
Azure Penetration Testing
Scala Security: Eliminate 200+ Code-Level Threats With Fortify SCA For Scala
Slashing Your Cloud Risk: 3 Must-Do's
Trust No-One Architecture For Services And Data
Microsoft azure - the cloud for modern business
Shared Security Responsibility for the Azure Cloud
Webinar: Inside Apache Solr 5
CSF18 - External Collaboration with Azure B2B - Sjoukje Zaal
Office Track: SharePoint Apps for the IT Pro - Thomas Vochten
Enter The Matrix Securing Azure’s Assets
Ad

Similar to 8 cloud design patterns you ought to know - Update Conference 2018 (20)

PPTX
Cloud patterns at Carleton University
PPTX
Cloud patterns forwardjs April Ottawa 2019
PDF
MS Cloud Design Patterns Infographic 2015
PDF
Ms cloud design patterns infographic 2015
PPTX
Cloud First Architecture
PPTX
Azure architecture design patterns - proven solutions to common challenges
PPTX
Applicare patterns di sviluppo con Azure
PDF
Cloud Design Patterns Book from Microsoft
PDF
Cloud Design Patterns
PDF
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
PDF
Software Architecture for Cloud Infrastructure
PPTX
Cloud architecture
PPTX
Azure Application Architecture Guide
PDF
Cloud-native Data: Every Microservice Needs a Cache
PDF
Finding Patterns in the Clouds - Cloud Design Patterns
PDF
The top 6 microservices patterns
PPTX
Cloud design pattern using azure
PDF
Summer School Soa EAP Asanka 18 Jun
PPTX
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
PPT
Best Practices for Large-Scale Websites -- Lessons from eBay
Cloud patterns at Carleton University
Cloud patterns forwardjs April Ottawa 2019
MS Cloud Design Patterns Infographic 2015
Ms cloud design patterns infographic 2015
Cloud First Architecture
Azure architecture design patterns - proven solutions to common challenges
Applicare patterns di sviluppo con Azure
Cloud Design Patterns Book from Microsoft
Cloud Design Patterns
Cloud Design Patterns - PRESCRIPTIVE ARCHITECTURE GUIDANCE FOR CLOUD APPLICAT...
Software Architecture for Cloud Infrastructure
Cloud architecture
Azure Application Architecture Guide
Cloud-native Data: Every Microservice Needs a Cache
Finding Patterns in the Clouds - Cloud Design Patterns
The top 6 microservices patterns
Cloud design pattern using azure
Summer School Soa EAP Asanka 18 Jun
Serhiy Kalinets "Embracing architectural challenges in the modern .NET world"
Best Practices for Large-Scale Websites -- Lessons from eBay
Ad

More from Taswar Bhatti (13)

PPTX
Get productive with python Visual Studio 2019
PPTX
Nodejsvault austin2019
PPTX
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
PPTX
Intro elasticsearch taswarbhatti
PPTX
Using Vault for your Nodejs Secrets
PPTX
Devteach 2017 OAuth and Open id connect demystified
PPTX
Devteach 2017 Store 2 million of audit a day into elasticsearch
PPTX
An introduction to Microsoft Bot Framework
PPTX
Dev days 1 Introduction to Xamarin Taswar Bhatti
PPTX
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
PPTX
Docker for .NET Developers
PPTX
Docker for .NET Developers
PPTX
Akka.Net Ottawa .NET User Group Meetup
Get productive with python Visual Studio 2019
Nodejsvault austin2019
Micrsoft Ignite Toronto - BRK3508 - 8 Cloud Design Patterns you ought to know
Intro elasticsearch taswarbhatti
Using Vault for your Nodejs Secrets
Devteach 2017 OAuth and Open id connect demystified
Devteach 2017 Store 2 million of audit a day into elasticsearch
An introduction to Microsoft Bot Framework
Dev days 1 Introduction to Xamarin Taswar Bhatti
Xamarin forms introduction by Taswar Bhatti and Ahmed Assad
Docker for .NET Developers
Docker for .NET Developers
Akka.Net Ottawa .NET User Group Meetup

Recently uploaded (20)

PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
ETO & MEO Certificate of Competency Questions and Answers
PPTX
web development for engineering and engineering
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPT
Project quality management in manufacturing
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Welding lecture in detail for understanding
PPTX
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
bas. eng. economics group 4 presentation 1.pptx
ETO & MEO Certificate of Competency Questions and Answers
web development for engineering and engineering
Structs to JSON How Go Powers REST APIs.pdf
Project quality management in manufacturing
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Arduino robotics embedded978-1-4302-3184-4.pdf
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Welding lecture in detail for understanding
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
573137875-Attendance-Management-System-original
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd

8 cloud design patterns you ought to know - Update Conference 2018

Editor's Notes

  • #3: For every 25 percent increase in problem complexity, there is a 100 percent increase in solution complexity. There is seldom one best design solution to a software problem. If cars were like software, they would crash twice a day for no reason, and when you called for service, they’d tell you to reinstall the engine.