SlideShare a Scribd company logo
1 of 21
August 31
BULGARIA AZURE BOOTCAMP IS POWERED BY:
Cloud Architecture Design Patterns
Proven Solutions to Common Challenges
Thanks to our Sponsors:
General Sponsors:
Technology Partner:
• Software Architect @
o 18+ years professional experience
• Microsoft Azure MVP
• External Expert Horizon 2020, Eurostars-Eureka
• External Expert InnoFund Denmark, RIF Cyprus
• Business Interests
o Web Development, SOA, Integration
o IoT, Machine Learning, Computer Intelligence
o Security & Performance Optimization
• Contact
ivelin.andreev@icb.bg
www.linkedin.com/in/ivelin
www.slideshare.net/ivoandreev
Speaker Bio
Takeaways
Azure Application Architecture Guide
• https://docs.microsoft.com/en-us/azure/architecture/guide/
Cloud Design Patterns for Azure (Series)
• Design and Implementation
• Availability and Resilience
• Data Management and Performance
Architecture be like
“bird’s eye view”
Implementation be like
“close-up”
Shortly after build completion
“the results”
Cloud Architecture Design Challenges
Availability
Data Management
Consistency
Messaging
Management & Monitoring
Performance & Scalability
Recover from Failures
Security
The time a system is functional and working (SLA Uptime %)
Data on multiple locations, performance and consistency
Predictable behaviour, reusable decisions, maintainability
Required by the distributed loosely coupled nature of the cloud
Expose runtime and debug information
Responsiveness within time unit, handle load w/o impact
Detecting failures, and recovering quickly and efficiently
Prevent malicious or accidental issues outside the designed usage
Management & Monitoring Patterns
Anti-corruption Layer
• Adapter layer between 2 subsystems to
isolate and translate semantics
• Consider
o Data consistency
o Extra maintenance point
o Permanent vs retiring layers
o Possible overhead and scalability challenges
o Interoperation with legacy system requires shared semantics
• Not Suitable
o No significant semantic differences between systems
Gateway Offloading Pattern
• Offload shared or specialized service
functionality to an API gateway / proxy
• Consider
o Central handling of shared features
o Maintain shared features in multiple places
o Delegate certain responsibilities to specialized team (i.e. security)
o Secure appropriate scaling, avoid bottlenecks
• Not Suitable
o When introducing coupling between services
o No business logic shall be offloaded (keep reusable)
When to use Messaging Services in Azure?
Event Grid
• Event-driven reactive
programming
Key Points
• Cheap (€0.5 per 1M)
• At least once delivery
• Does not deliver data
• Order delivery not possible
• Push-based delivery
Reason to Use
• React on event
Event Hub
• Big data and telemetry
pipeline
Key Points
• Semi-cheap (€9.2/month)
• At least once delivery
• Low latency, millions of
events per sec.
Reason to Use
• Telemetry streaming
Service Bus
• High value secure
messaging and control
Key Points
• 13M free, €0.0114 unit/h
• Batches, filters, duplicate
detection, transactions
• Pull-based delivery
• Order delivery
Reason to Use
• X-system transactions
https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services
Claim-Check Pattern
• Split large messages into claim-payload to
protect message bus from overwhelming
• Consider
o Custom logic to apply pattern for large messages only
o Delete the message data after consuming
• Not Suitable
o Overhead for small messages
Messaging Patterns
Asynch Request-Reply
• Decouple backend processing from a frontend host
• Consider
o Validate request prior to starting a long running task
o API endpoint shall return:
• Location – a place where to poll, includes CorrelationID
• Retry Interval – when to retry for new status to reduce unnecessary load
o Callback endpoint could be used instead
• Not Suitable
o When response latency is important
o When callback, WebSockets or SignalR are possiblehttps://github.com/SeanFeldman/ServiceBus.AttachmentPlugin
Availability Patterns
Throttling
• Control resource consumption to allow
system functioning under extreme load
• Consider
o Reject requests from some users (service time or last)
o Degrade Quality of Service (bandwidth, compression, time)
o Delay operation (i.e. queue processing time)
o Provide specific Throttling error code to denied user
o Quickly detect high demand and apply throttling
Health Endpoint Monitoring
• Functional check of an application using
external endpoint on given interval
• Consider
o Tools (App Insights Web Tests, System Center Ops Manager)
o Get response time to a health verification endpoint
o Analyse results (Alive != Working, response body)
o Consider action in case of failure (i.e. restart)
o Secure the endpoint – authentication, IP filter
Two Types of Azure Queue Services?
Storage Queue
• Part of Azure storage infrastructure
• Simple Get/Put/Peek interface
Key Points
• No message ordering guarantee
• At least once delivery
• Intended for decoupling for scalability scenarios
• Scheduled delivery and poison message support
• No duplicate detection
• No session support
• Max message size 64KB
Service Bus Queue
• Part of Azure Messaging infrastructure
• Publish–subscribe model
Key Points
• Message ordering guarantee
• At least once / At most once delivery
• Transactions within a queue
• Scheduled delivery and poison message support
• Duplicate detection based on MessageId
• Session support for message processing affinity
• Max message size 1MB
https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services
Pipes and Filters Integration
• Decompose a complex task in separate
individually scalable elements
• Suitable – reusable pipeline filters; avoid
bottleneck filters; breakable processing;
flexibility to reorder steps; context sharing
Consistent Design Patterns
• Sample Implementation
o Message Queue (i.e. AZ Service Bus) receives raw message
o Filter task (i.e. AZ Function App) listens and transforms message
o Message enqueued on next queue
o Until final message is built
• Not suitable – processing steps are not
independent (i.e. bad design) or transactional;
huge context may make the process
inefficient; not sufficient scalability of
underlying resources (i.e. DB)
https://github.com/mspnp/cloud-design-patterns/tree/master/pipes-and-filters
Gateway Aggregation
• Aggregate individual requests to one.
Improve performance on high-latency
network
• Suitable
o CorrelationID identification of original calls
o Partial response on service failure
o Caching
o No service coupling for backend services
o Near to backend to reduce latency
• Not Suitable
o Need to reduce calls to backend (i.e. with batch handling)
o Application is near to backend and latency is practically zero
Consistent Design Patterns
Command and Query Request Segregation
• Separate Read and Create operations to a datastore
for performance, scalability and security.
• Suitable
o Enqueue async commands
o Separate R/W databases, individual scaling R/W endpoints
• Not suitable
o Simple domain and business rules;
o When CRUD interface implementation is sufficient
Ambassador Proxy
• External process sends requests on behalf
of a consumer service or application
• Suitable
o Offload common topics on same host as a sidecar;
o Extend legacy or not modifiable apps
• Not suitable
o Latency overhead unacceptable
o Context sharing required
o Reusability cannot be achieved
Consistent Design Patterns
Strangler Façade
• Incrementally migrate a legacy system,
gradually replacing pieces of functionality
• Suitable
o Avoid bottleneck façade;
o Assure common resources are accessible
• Not suitable
o Cannot intercept backend calls;
o No complex wholesale replacement
Sidecar Pattern
• Deploy components in a separate process to
provide isolation and encapsulation
• i.e. Infrastructure Sidecar - monitors main app
• Consider
o Suitable interprocess communication (reliability, performance)
o Service or daemon instead of sidecar
• Suitable
o Heterogeneous languages
o Different teams or entity owns a component
o Independent update of components shall be enabled
• Not Suitable
o Performance of communication is critical
o Small solutions where the design benefit is not worth
o Individual scaling requirements may require a service
Consistent Design Patterns
Circuit Breaker Pattern
• Prevent application from repeatedly trying
to execute remote service, likely to fail.
• Suitable – temporary errors due to
timeout, network issues, high resource
utilization
o Closed – request routed to endpoint (Threshold)
o Open – request fails immediately (Timer)
o Half-open - limited number of requests are monitored to decide
on Open/Closed
• Challenges
o Resource differentiation and resource abstraction
o Manual override to open state
o Enqueue failed requests for reprocessing
• Not Suitable - local/in-memory resources
Resiliency Patterns
Resiliency Patterns
Compensating Transaction Pattern
• Undo the work from an eventually
consistent transaction from series of steps.
• Challenges
o Simple replace of previous state is rarely possible
o Record information on each step on how steps can be undone.
o Undo might not be doable in exactly the reverse order
o Consider retry logic to try avoiding compensating transactions
o Restore first the more sensitive to changes entities
o Compensating transaction shall be idempotent (repeatable)
• Suitable
o Avoid distributed transactions with eventual consistency
o Undo failed steps by performing the reverse action
• Not Suitable
o Try to avoid the complications if possible
Valet Key Pattern
• Token for restricted access to resource to offload
workload from the main application
• Consider
o Manage key validation, use short key expiration
o Key only for the required operation
o Audit all operations; deliver the key securely
o Provide the client with a key or token that the data store can validate.
• Not Suitable
o When action is required before sending to datastore.
o Limit user behavior – i.e. subscribe to events of resource to validate
Gatekeeper Pattern
• Limit attack surface by using dedicated
instance to sanitize and validate requests
• Challenges
o The backend host shall not expose unprotected endpoints
o May introduce single point of failure or performance hit
o Shall not perform actions other than sanitization
• Suitable
o Services with high degree of sensitive data
o Centralize validation
Security Patterns
Resiliency Patterns
Queue-Based Load Leveling
• Use a buffer queue between a task and a
service to smooth demand peaks.
• Suitable
o Maximize availability when overloading is expected
o Maximize scalability as Tasks and Services grow independently
o Reasonable cost – services scale on load, rather than max load
• Challenges
o Communication is one-way. When response is needed, use Async
request-reply with correlation ID (i.e. sequence Nr)
o Control the rate of consuming messages to avoid overload of
underlying resources (i.e. scaling consumers and DB contention)
• Not Suitable
o When minimal latency is critical
Performance and Scalability Patterns
Materialized View Pattern
• Prepopulated view in the necessary format
to support efficient querying
• Suitable
o Performance improvement; Limited data access
o Query simplification – ignore data complexity RDBMS + NOSQL
• Challenges
o Reusability – likely to have multiple hits
o Disposability – can be regenerated at any time
o Variability – can vary on user or query parameters
o Consistency – data may become outdated
o Regeneration – update on new data, manual trigger
• Not Suitable
o Easy to read source data
o Data changes very quickly and requires lots of regenerations
o Consistency is a priority
o Domain Driven Design – behaviour w/o data (as in microservices)

More Related Content

What's hot

Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar Timothy McAliley
 
App Modernization Pitch Deck.pptx
App Modernization Pitch Deck.pptxApp Modernization Pitch Deck.pptx
App Modernization Pitch Deck.pptxMONISH407209
 
Google Vertex AI
Google Vertex AIGoogle Vertex AI
Google Vertex AIVikasBisoi
 
Google Cloud Platform
Google Cloud PlatformGoogle Cloud Platform
Google Cloud PlatformGeneXus
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Araf Karsh Hamid
 
Communication in a Microservice Architecture
Communication in a Microservice ArchitectureCommunication in a Microservice Architecture
Communication in a Microservice ArchitecturePer Bernhardt
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices Amazon Web Services
 
Azure Security Fundamentals
Azure Security FundamentalsAzure Security Fundamentals
Azure Security FundamentalsLorenzo Barbieri
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overviewJames Serra
 
Microservices, DevOps, and Continuous Delivery
Microservices, DevOps, and Continuous DeliveryMicroservices, DevOps, and Continuous Delivery
Microservices, DevOps, and Continuous DeliveryKhalid Salama
 
AWS Glue - let's get stuck in!
AWS Glue - let's get stuck in!AWS Glue - let's get stuck in!
AWS Glue - let's get stuck in!Chris Taylor
 

What's hot (20)

Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
Azure Cloud Adoption Framework + Governance - Sana Khan and Jay Kumar
 
Dynatrace
DynatraceDynatrace
Dynatrace
 
App Modernization Pitch Deck.pptx
App Modernization Pitch Deck.pptxApp Modernization Pitch Deck.pptx
App Modernization Pitch Deck.pptx
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Google Vertex AI
Google Vertex AIGoogle Vertex AI
Google Vertex AI
 
Google Cloud Platform
Google Cloud PlatformGoogle Cloud Platform
Google Cloud Platform
 
Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018Microservices Architecture - Bangkok 2018
Microservices Architecture - Bangkok 2018
 
Azure Cost Management
Azure Cost ManagementAzure Cost Management
Azure Cost Management
 
Communication in a Microservice Architecture
Communication in a Microservice ArchitectureCommunication in a Microservice Architecture
Communication in a Microservice Architecture
 
AWS glue technical enablement training
AWS glue technical enablement trainingAWS glue technical enablement training
AWS glue technical enablement training
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices
 
Data as a service
Data as a serviceData as a service
Data as a service
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
Azure migration
Azure migrationAzure migration
Azure migration
 
Azure Security Fundamentals
Azure Security FundamentalsAzure Security Fundamentals
Azure Security Fundamentals
 
Open Banking APIs on AWS
Open Banking APIs on AWSOpen Banking APIs on AWS
Open Banking APIs on AWS
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
Microservices, DevOps, and Continuous Delivery
Microservices, DevOps, and Continuous DeliveryMicroservices, DevOps, and Continuous Delivery
Microservices, DevOps, and Continuous Delivery
 
AWS Glue - let's get stuck in!
AWS Glue - let's get stuck in!AWS Glue - let's get stuck in!
AWS Glue - let's get stuck in!
 
App Modernization
App ModernizationApp Modernization
App Modernization
 

Similar to Azure architecture design patterns - proven solutions to common challenges

Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Stamo Petkov
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applicationsAmit Kejriwal
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Derek Ashmore
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsClemens Vasters
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that growGibraltar Software
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithMarkus Eisele
 
A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology confluent
 
Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015Randy Shoup
 
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Amazon Web Services
 
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsCloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsTaswar Bhatti
 
Expect the unexpected: Prepare for failures in microservices
Expect the unexpected: Prepare for failures in microservicesExpect the unexpected: Prepare for failures in microservices
Expect the unexpected: Prepare for failures in microservicesBhakti Mehta
 
Service Architectures at Scale
Service Architectures at ScaleService Architectures at Scale
Service Architectures at ScaleRandy Shoup
 
Azure Application Architecture Guide ~Design principles for Azure application...
Azure Application Architecture Guide ~Design principles for Azure application...Azure Application Architecture Guide ~Design principles for Azure application...
Azure Application Architecture Guide ~Design principles for Azure application...Naoki (Neo) SATO
 
PMIx Updated Overview
PMIx Updated OverviewPMIx Updated Overview
PMIx Updated OverviewRalph Castain
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-ServicesRandy Shoup
 
Resilience planning and how the empire strikes back
Resilience planning and how the empire strikes backResilience planning and how the empire strikes back
Resilience planning and how the empire strikes backBhakti Mehta
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureTapio Rautonen
 
Cloud Computing - Geektalk
Cloud Computing - GeektalkCloud Computing - Geektalk
Cloud Computing - GeektalkMalisa Ncube
 
Azure AWS real time-interview questions part 9
Azure AWS real time-interview questions part 9Azure AWS real time-interview questions part 9
Azure AWS real time-interview questions part 9Malleswar Reddy
 

Similar to Azure architecture design patterns - proven solutions to common challenges (20)

Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that grow
 
Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology
 
Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015Service Architectures At Scale - QCon London 2015
Service Architectures At Scale - QCon London 2015
 
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
 
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsCloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong Codeaholics
 
Expect the unexpected: Prepare for failures in microservices
Expect the unexpected: Prepare for failures in microservicesExpect the unexpected: Prepare for failures in microservices
Expect the unexpected: Prepare for failures in microservices
 
Service Architectures at Scale
Service Architectures at ScaleService Architectures at Scale
Service Architectures at Scale
 
Azure Application Architecture Guide ~Design principles for Azure application...
Azure Application Architecture Guide ~Design principles for Azure application...Azure Application Architecture Guide ~Design principles for Azure application...
Azure Application Architecture Guide ~Design principles for Azure application...
 
PMIx Updated Overview
PMIx Updated OverviewPMIx Updated Overview
PMIx Updated Overview
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
Resilience planning and how the empire strikes back
Resilience planning and how the empire strikes backResilience planning and how the empire strikes back
Resilience planning and how the empire strikes back
 
Software Architecture for Cloud Infrastructure
Software Architecture for Cloud InfrastructureSoftware Architecture for Cloud Infrastructure
Software Architecture for Cloud Infrastructure
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Cloud Computing - Geektalk
Cloud Computing - GeektalkCloud Computing - Geektalk
Cloud Computing - Geektalk
 
Azure AWS real time-interview questions part 9
Azure AWS real time-interview questions part 9Azure AWS real time-interview questions part 9
Azure AWS real time-interview questions part 9
 

More from Ivo Andreev

Cybersecurity and Generative AI - for Good and Bad vol.2
Cybersecurity and Generative AI - for Good and Bad vol.2Cybersecurity and Generative AI - for Good and Bad vol.2
Cybersecurity and Generative AI - for Good and Bad vol.2Ivo Andreev
 
Architecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for BusinessArchitecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for BusinessIvo Andreev
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIIvo Andreev
 
How do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for DevelopersHow do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for DevelopersIvo Andreev
 
OpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and MisconceptionsOpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and MisconceptionsIvo Andreev
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneIvo Andreev
 
Collecting and Analysing Spaceborn Data
Collecting and Analysing Spaceborn DataCollecting and Analysing Spaceborn Data
Collecting and Analysing Spaceborn DataIvo Andreev
 
Collecting and Analysing Satellite Data with Azure Orbital
Collecting and Analysing Satellite Data with Azure OrbitalCollecting and Analysing Satellite Data with Azure Orbital
Collecting and Analysing Satellite Data with Azure OrbitalIvo Andreev
 
Language Studio and Custom Models
Language Studio and Custom ModelsLanguage Studio and Custom Models
Language Studio and Custom ModelsIvo Andreev
 
CosmosDB for IoT Scenarios
CosmosDB for IoT ScenariosCosmosDB for IoT Scenarios
CosmosDB for IoT ScenariosIvo Andreev
 
Forecasting time series powerful and simple
Forecasting time series powerful and simpleForecasting time series powerful and simple
Forecasting time series powerful and simpleIvo Andreev
 
Constrained Optimization with Genetic Algorithms and Project Bonsai
Constrained Optimization with Genetic Algorithms and Project BonsaiConstrained Optimization with Genetic Algorithms and Project Bonsai
Constrained Optimization with Genetic Algorithms and Project BonsaiIvo Andreev
 
Azure security guidelines for developers
Azure security guidelines for developers Azure security guidelines for developers
Azure security guidelines for developers Ivo Andreev
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiIvo Andreev
 
Global azure virtual 2021 - Azure Lighthouse
Global azure virtual 2021 - Azure LighthouseGlobal azure virtual 2021 - Azure Lighthouse
Global azure virtual 2021 - Azure LighthouseIvo Andreev
 
Flux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSFlux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSIvo Andreev
 
Industrial IoT on Azure
Industrial IoT on AzureIndustrial IoT on Azure
Industrial IoT on AzureIvo Andreev
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkIvo Andreev
 
Flying a Drone with JavaScript and Computer Vision
Flying a Drone with JavaScript and Computer VisionFlying a Drone with JavaScript and Computer Vision
Flying a Drone with JavaScript and Computer VisionIvo Andreev
 

More from Ivo Andreev (20)

Cybersecurity and Generative AI - for Good and Bad vol.2
Cybersecurity and Generative AI - for Good and Bad vol.2Cybersecurity and Generative AI - for Good and Bad vol.2
Cybersecurity and Generative AI - for Good and Bad vol.2
 
Architecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for BusinessArchitecting AI Solutions in Azure for Business
Architecting AI Solutions in Azure for Business
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
 
How do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for DevelopersHow do OpenAI GPT Models Work - Misconceptions and Tips for Developers
How do OpenAI GPT Models Work - Misconceptions and Tips for Developers
 
OpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and MisconceptionsOpenAI GPT in Depth - Questions and Misconceptions
OpenAI GPT in Depth - Questions and Misconceptions
 
Cutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for EveryoneCutting Edge Computer Vision for Everyone
Cutting Edge Computer Vision for Everyone
 
Collecting and Analysing Spaceborn Data
Collecting and Analysing Spaceborn DataCollecting and Analysing Spaceborn Data
Collecting and Analysing Spaceborn Data
 
Collecting and Analysing Satellite Data with Azure Orbital
Collecting and Analysing Satellite Data with Azure OrbitalCollecting and Analysing Satellite Data with Azure Orbital
Collecting and Analysing Satellite Data with Azure Orbital
 
Language Studio and Custom Models
Language Studio and Custom ModelsLanguage Studio and Custom Models
Language Studio and Custom Models
 
CosmosDB for IoT Scenarios
CosmosDB for IoT ScenariosCosmosDB for IoT Scenarios
CosmosDB for IoT Scenarios
 
Forecasting time series powerful and simple
Forecasting time series powerful and simpleForecasting time series powerful and simple
Forecasting time series powerful and simple
 
Constrained Optimization with Genetic Algorithms and Project Bonsai
Constrained Optimization with Genetic Algorithms and Project BonsaiConstrained Optimization with Genetic Algorithms and Project Bonsai
Constrained Optimization with Genetic Algorithms and Project Bonsai
 
Azure security guidelines for developers
Azure security guidelines for developers Azure security guidelines for developers
Azure security guidelines for developers
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
 
Global azure virtual 2021 - Azure Lighthouse
Global azure virtual 2021 - Azure LighthouseGlobal azure virtual 2021 - Azure Lighthouse
Global azure virtual 2021 - Azure Lighthouse
 
Flux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JSFlux QL - Nexgen Management of Time Series Inspired by JS
Flux QL - Nexgen Management of Time Series Inspired by JS
 
Industrial IoT on Azure
Industrial IoT on AzureIndustrial IoT on Azure
Industrial IoT on Azure
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it Work
 
Flying a Drone with JavaScript and Computer Vision
Flying a Drone with JavaScript and Computer VisionFlying a Drone with JavaScript and Computer Vision
Flying a Drone with JavaScript and Computer Vision
 

Recently uploaded

%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 

Recently uploaded (20)

%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 

Azure architecture design patterns - proven solutions to common challenges

  • 1. August 31 BULGARIA AZURE BOOTCAMP IS POWERED BY: Cloud Architecture Design Patterns Proven Solutions to Common Challenges
  • 2. Thanks to our Sponsors: General Sponsors: Technology Partner:
  • 3. • Software Architect @ o 18+ years professional experience • Microsoft Azure MVP • External Expert Horizon 2020, Eurostars-Eureka • External Expert InnoFund Denmark, RIF Cyprus • Business Interests o Web Development, SOA, Integration o IoT, Machine Learning, Computer Intelligence o Security & Performance Optimization • Contact ivelin.andreev@icb.bg www.linkedin.com/in/ivelin www.slideshare.net/ivoandreev Speaker Bio
  • 4. Takeaways Azure Application Architecture Guide • https://docs.microsoft.com/en-us/azure/architecture/guide/ Cloud Design Patterns for Azure (Series) • Design and Implementation • Availability and Resilience • Data Management and Performance
  • 5. Architecture be like “bird’s eye view” Implementation be like “close-up”
  • 6. Shortly after build completion “the results”
  • 7. Cloud Architecture Design Challenges Availability Data Management Consistency Messaging Management & Monitoring Performance & Scalability Recover from Failures Security The time a system is functional and working (SLA Uptime %) Data on multiple locations, performance and consistency Predictable behaviour, reusable decisions, maintainability Required by the distributed loosely coupled nature of the cloud Expose runtime and debug information Responsiveness within time unit, handle load w/o impact Detecting failures, and recovering quickly and efficiently Prevent malicious or accidental issues outside the designed usage
  • 8. Management & Monitoring Patterns Anti-corruption Layer • Adapter layer between 2 subsystems to isolate and translate semantics • Consider o Data consistency o Extra maintenance point o Permanent vs retiring layers o Possible overhead and scalability challenges o Interoperation with legacy system requires shared semantics • Not Suitable o No significant semantic differences between systems Gateway Offloading Pattern • Offload shared or specialized service functionality to an API gateway / proxy • Consider o Central handling of shared features o Maintain shared features in multiple places o Delegate certain responsibilities to specialized team (i.e. security) o Secure appropriate scaling, avoid bottlenecks • Not Suitable o When introducing coupling between services o No business logic shall be offloaded (keep reusable)
  • 9. When to use Messaging Services in Azure? Event Grid • Event-driven reactive programming Key Points • Cheap (€0.5 per 1M) • At least once delivery • Does not deliver data • Order delivery not possible • Push-based delivery Reason to Use • React on event Event Hub • Big data and telemetry pipeline Key Points • Semi-cheap (€9.2/month) • At least once delivery • Low latency, millions of events per sec. Reason to Use • Telemetry streaming Service Bus • High value secure messaging and control Key Points • 13M free, €0.0114 unit/h • Batches, filters, duplicate detection, transactions • Pull-based delivery • Order delivery Reason to Use • X-system transactions https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services
  • 10. Claim-Check Pattern • Split large messages into claim-payload to protect message bus from overwhelming • Consider o Custom logic to apply pattern for large messages only o Delete the message data after consuming • Not Suitable o Overhead for small messages Messaging Patterns Asynch Request-Reply • Decouple backend processing from a frontend host • Consider o Validate request prior to starting a long running task o API endpoint shall return: • Location – a place where to poll, includes CorrelationID • Retry Interval – when to retry for new status to reduce unnecessary load o Callback endpoint could be used instead • Not Suitable o When response latency is important o When callback, WebSockets or SignalR are possiblehttps://github.com/SeanFeldman/ServiceBus.AttachmentPlugin
  • 11. Availability Patterns Throttling • Control resource consumption to allow system functioning under extreme load • Consider o Reject requests from some users (service time or last) o Degrade Quality of Service (bandwidth, compression, time) o Delay operation (i.e. queue processing time) o Provide specific Throttling error code to denied user o Quickly detect high demand and apply throttling Health Endpoint Monitoring • Functional check of an application using external endpoint on given interval • Consider o Tools (App Insights Web Tests, System Center Ops Manager) o Get response time to a health verification endpoint o Analyse results (Alive != Working, response body) o Consider action in case of failure (i.e. restart) o Secure the endpoint – authentication, IP filter
  • 12. Two Types of Azure Queue Services? Storage Queue • Part of Azure storage infrastructure • Simple Get/Put/Peek interface Key Points • No message ordering guarantee • At least once delivery • Intended for decoupling for scalability scenarios • Scheduled delivery and poison message support • No duplicate detection • No session support • Max message size 64KB Service Bus Queue • Part of Azure Messaging infrastructure • Publish–subscribe model Key Points • Message ordering guarantee • At least once / At most once delivery • Transactions within a queue • Scheduled delivery and poison message support • Duplicate detection based on MessageId • Session support for message processing affinity • Max message size 1MB https://docs.microsoft.com/en-us/azure/event-grid/compare-messaging-services
  • 13. Pipes and Filters Integration • Decompose a complex task in separate individually scalable elements • Suitable – reusable pipeline filters; avoid bottleneck filters; breakable processing; flexibility to reorder steps; context sharing Consistent Design Patterns • Sample Implementation o Message Queue (i.e. AZ Service Bus) receives raw message o Filter task (i.e. AZ Function App) listens and transforms message o Message enqueued on next queue o Until final message is built • Not suitable – processing steps are not independent (i.e. bad design) or transactional; huge context may make the process inefficient; not sufficient scalability of underlying resources (i.e. DB) https://github.com/mspnp/cloud-design-patterns/tree/master/pipes-and-filters
  • 14. Gateway Aggregation • Aggregate individual requests to one. Improve performance on high-latency network • Suitable o CorrelationID identification of original calls o Partial response on service failure o Caching o No service coupling for backend services o Near to backend to reduce latency • Not Suitable o Need to reduce calls to backend (i.e. with batch handling) o Application is near to backend and latency is practically zero Consistent Design Patterns Command and Query Request Segregation • Separate Read and Create operations to a datastore for performance, scalability and security. • Suitable o Enqueue async commands o Separate R/W databases, individual scaling R/W endpoints • Not suitable o Simple domain and business rules; o When CRUD interface implementation is sufficient
  • 15. Ambassador Proxy • External process sends requests on behalf of a consumer service or application • Suitable o Offload common topics on same host as a sidecar; o Extend legacy or not modifiable apps • Not suitable o Latency overhead unacceptable o Context sharing required o Reusability cannot be achieved Consistent Design Patterns Strangler Façade • Incrementally migrate a legacy system, gradually replacing pieces of functionality • Suitable o Avoid bottleneck façade; o Assure common resources are accessible • Not suitable o Cannot intercept backend calls; o No complex wholesale replacement
  • 16. Sidecar Pattern • Deploy components in a separate process to provide isolation and encapsulation • i.e. Infrastructure Sidecar - monitors main app • Consider o Suitable interprocess communication (reliability, performance) o Service or daemon instead of sidecar • Suitable o Heterogeneous languages o Different teams or entity owns a component o Independent update of components shall be enabled • Not Suitable o Performance of communication is critical o Small solutions where the design benefit is not worth o Individual scaling requirements may require a service Consistent Design Patterns
  • 17. Circuit Breaker Pattern • Prevent application from repeatedly trying to execute remote service, likely to fail. • Suitable – temporary errors due to timeout, network issues, high resource utilization o Closed – request routed to endpoint (Threshold) o Open – request fails immediately (Timer) o Half-open - limited number of requests are monitored to decide on Open/Closed • Challenges o Resource differentiation and resource abstraction o Manual override to open state o Enqueue failed requests for reprocessing • Not Suitable - local/in-memory resources Resiliency Patterns
  • 18. Resiliency Patterns Compensating Transaction Pattern • Undo the work from an eventually consistent transaction from series of steps. • Challenges o Simple replace of previous state is rarely possible o Record information on each step on how steps can be undone. o Undo might not be doable in exactly the reverse order o Consider retry logic to try avoiding compensating transactions o Restore first the more sensitive to changes entities o Compensating transaction shall be idempotent (repeatable) • Suitable o Avoid distributed transactions with eventual consistency o Undo failed steps by performing the reverse action • Not Suitable o Try to avoid the complications if possible
  • 19. Valet Key Pattern • Token for restricted access to resource to offload workload from the main application • Consider o Manage key validation, use short key expiration o Key only for the required operation o Audit all operations; deliver the key securely o Provide the client with a key or token that the data store can validate. • Not Suitable o When action is required before sending to datastore. o Limit user behavior – i.e. subscribe to events of resource to validate Gatekeeper Pattern • Limit attack surface by using dedicated instance to sanitize and validate requests • Challenges o The backend host shall not expose unprotected endpoints o May introduce single point of failure or performance hit o Shall not perform actions other than sanitization • Suitable o Services with high degree of sensitive data o Centralize validation Security Patterns
  • 20. Resiliency Patterns Queue-Based Load Leveling • Use a buffer queue between a task and a service to smooth demand peaks. • Suitable o Maximize availability when overloading is expected o Maximize scalability as Tasks and Services grow independently o Reasonable cost – services scale on load, rather than max load • Challenges o Communication is one-way. When response is needed, use Async request-reply with correlation ID (i.e. sequence Nr) o Control the rate of consuming messages to avoid overload of underlying resources (i.e. scaling consumers and DB contention) • Not Suitable o When minimal latency is critical
  • 21. Performance and Scalability Patterns Materialized View Pattern • Prepopulated view in the necessary format to support efficient querying • Suitable o Performance improvement; Limited data access o Query simplification – ignore data complexity RDBMS + NOSQL • Challenges o Reusability – likely to have multiple hits o Disposability – can be regenerated at any time o Variability – can vary on user or query parameters o Consistency – data may become outdated o Regeneration – update on new data, manual trigger • Not Suitable o Easy to read source data o Data changes very quickly and requires lots of regenerations o Consistency is a priority o Domain Driven Design – behaviour w/o data (as in microservices)