Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Advanced Serverless Architectures with Microsoft Azure
Advanced Serverless Architectures with Microsoft Azure

Advanced Serverless Architectures with Microsoft Azure: Design complex serverless systems quickly with the scalability and benefits of Azure

Arrow left icon
Profile Icon Daniel Bass
Arrow right icon
€15.99 €23.99
eBook Feb 2019 278 pages 1st Edition
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Daniel Bass
Arrow right icon
€15.99 €23.99
eBook Feb 2019 278 pages 1st Edition
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Advanced Serverless Architectures with Microsoft Azure

Chapter 2. Microservices and Serverless Scaling Patterns

Note

Learning Objectives

By the end of this chapter, you will be able to:

  • Describe the unique scaling challenges presented by serverless architectures

  • Create a serverless queue for feeding your product's database

  • Design a caching strategy to fit any requirements with a serverless architecture

  • Use asynchronous processing rather than synchronous processing

Note

This chapter explains how to build a highly scalable solution using a queue, load messages onto the queue, and read them asynchronously.

Introduction


In the previous chapter, you created all of the core individual components of a complete serverless architecture. The important thing to note is the total separation of frontend and backend development—this will free both disciplines of development to progress rapidly.

In this chapter, you will learn how to connect them up to deliver the first feature of your serverless application. Here, we will be covering asynchronous processing and caching as a way to increase the scalability of serverless architecture.

Microservices


Individual serverless components have the capability to scale infinitely (up to the capacity of your cloud provider, which is infinite when infinity is considered relative to an average company's compute power). This sounds, and indeed is, amazing and very useful, but these components tend to expose issues with application architectures that you previously couldn't see. This issue is called serverless backpressure. The following backend components can be impacted by this backpressure:

  • Third-party APIs: It is incredibly common to depend on third-party APIs such as Stripe, Twitter, and Paypal these days. Whether these are to provide payment services (like Stripe or the Bitcoin network) or to provide data (like Bloomberg or Reuters), most applications have an integration of some kind. Serverless applications can cause unexpected problems with these relationships by flooding them with requests far beyond what they can handle. These services often have a rate limit in their SLA too...

Serverless Queues


One of the most useful components in scaling a serverless architecture is the queue. Queues are a key asynchronous processing concept. In a queue, data points are added to the back of the queue and taken from the front. An example of this is a first-in-first-out data structure. In a cloud architecture, a queue will generally store events or messages from an upstream process until subscribers downstream have the time to process them.

An important thing to understand before deciding to use a queue is the compromise you are making in using one. In a synchronous operation (that is, inserting a record into a database all in one operation), if something goes wrong, you have instant feedback to your user. In an asynchronous operation (that is, dropping an event onto a queue that a worker later picks up to insert into the same database), if the later operations go wrong, then the user has usually left the application and cannot fix their mistake or call support.

A good way to try...

Caching


The practice of storing previously requested data in a small, high-speed data layer and returning it, instead of requesting the data again, is called caching. Caching is a vast and complex topic, so this book will focus on the cheapest wins for your application rather than attempting to cover everything.

Caching both reduces replicated demand for compute and speeds up applications. It is also very useful for reducing serverless backpressure in two ways: first, by reducing the number of requests that hit the backend and second, by reducing the number of requests that hit "weak" resources.

Client-side caching is the easiest way to have an immediate impact on the number of requests you see per second, and also the easiest to understand in terms of requirements. It also immediately improves the performance of your application for your end users, as they receive data much faster. However, client-side caching is frequently done badly or not at all. Serverless has a great way of highlighting...

Asynchronous by Default


A lot of applications are synchronous. That is to say, when you perform an action, the program processes it and returns the answer, holding up the program and the user from doing anything else until it has returned the answer. This is the way most developers design their applications, particularly those used to REST. However, this can become a serious barrier to scalability. If your application needs to process complex requests, the time taken becomes intolerable to the end user. This is the point where most developers will decide to adjust the behavior for this request so that the synchronous part simply includes validation, and processing is done asynchronously. Asynchronous behavior is where the user performs an action and the application processes it when it has time, rather than keeping the user sitting there.

With a serverless architecture, it is a very good idea to shift your mindset. When designing applications, you should endeavor to be asynchronous by default...

Summary


In this chapter, you have learned about the principles of scalability in a serverless architecture, which will help guide you throughout your serverless application development. By making your applications asynchronous and utilize caching, your serverless application will scale effectively. You've also added headers to explicitly control caching behavior and utilized queues and other asynchronous methods. In the next chapter, you will be learning about Durable Functions, and how you can use them to orchestrate long-running workflows.

Left arrow icon Right arrow icon

Key benefits

  • Use serverless systems to help you fulfill complex requirements
  • Develop your knowledge of Azure Microsoft Serverless
  • Understand concepts with a hands-on approach and helpful examples

Description

Advanced Serverless Architectures with Microsoft Azure redefines your experience of designing serverless systems. It shows you how to tackle challenges of varying levels, not just the straightforward ones. You'll be learning how to deliver features quickly by building systems, which retain the scalability and benefits of serverless. You'll begin your journey by learning how to build a simple, completely serverless application. Then, you'll build a highly scalable solution using a queue, load messages onto the queue, and read them asynchronously. To boost your knowledge further, the book also features durable functions and ways to use them to solve errors in a complex system. You'll then learn about security by building a security solution from serverless components. Next, you’ll gain an understanding of observability and ways to leverage application insights to bring you performance benefits. As you approach the concluding chapters, you’ll explore chaos engineering and the benefits of resilience, by actively switching off a few of the functions within a complex system, submitting a request, and observing the resulting behavior. By the end of this book, you will have developed the skills you need to build and maintain increasingly complex systems that match evolving platform requirements.

Who is this book for?

Advanced Serverless Architectures with Microsoft Azure is is ideal if you want to build serverless systems with fewer outages and high performance using Azure. Familiarity with the C# syntax and Azure Functions and ARM templates will help you to benefit more from this book. Prior knowledge of basic front-end development, HTML JS, and CSS is beneficial but not essential. Some DevOps knowledge is also beneficial but not essential.

What you will learn

  • Understand what true serverless architecture is
  • Study how to extend and scale architectures until they become ‘complex
  • Implement durable functions in your design
  • Improve the observability of your serverless architecture
  • Implement security solutions using serverless services
  • Learn how to ‘practise chaos engineering in production

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 28, 2019
Length: 278 pages
Edition : 1st
Language : English
ISBN-13 : 9781788395571
Vendor :
Microsoft
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Feb 28, 2019
Length: 278 pages
Edition : 1st
Language : English
ISBN-13 : 9781788395571
Vendor :
Microsoft
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 103.97
Azure Serverless Computing Cookbook
€36.99
Advanced Serverless Architectures with Microsoft Azure
€29.99
Serverless Integration Design Patterns with Azure
€36.99
Total 103.97 Stars icon
Banner background image

Table of Contents

6 Chapters
Complete Serverless Architectures Chevron down icon Chevron up icon
Microservices and Serverless Scaling Patterns Chevron down icon Chevron up icon
Azure Durable Functions Chevron down icon Chevron up icon
Security Chevron down icon Chevron up icon
Observability Chevron down icon Chevron up icon
Chaos Engineering Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.