Slide 1

Slide 1 text

Serverless Single Page Apps on Azure Daron Yöndem http://daron.me @daronyondem

Slide 2

Slide 2 text

Hosting something in Azure? • Virtual Machine • Kubernetes (AKS) • Docker / Containers (ACI) • App Service Plans • Cloud Services • Anything else left out there?

Slide 3

Slide 3 text

What you really need for a SPA? • Static file hosting • Maybe some APIs?

Slide 4

Slide 4 text

What you really need for a SPA? • Static file hosting > Azure Storage • Maybe some APIs? > Serverless Sauce (Azure Functions)

Slide 5

Slide 5 text

Let’s get some storage! DEMO

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Storage Account Limits

Slide 11

Slide 11 text

What about getting some CDN Magic? DEMO

Slide 12

Slide 12 text

What about adding a CDN?

Slide 13

Slide 13 text

Don’t forget to change to origin!

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Getting a custom domain

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

After the domain name is validated, it can take up to 6-8 hours for the custom domain HTTPS feature to be activated.

Slide 18

Slide 18 text

Premium for more! • HTTP to HTTPS redirection • Analytics • URL Rewrite • And some more goodies

Slide 19

Slide 19 text

So far…. • Hosting for our static files • CDN in front of it • HTTPS Enabled

Slide 20

Slide 20 text

API for the Contact Form • Will use SendGrid to send e-mail. • Need an endpoint to pass contact form content. • Need it to be protected against abuse.

Slide 21

Slide 21 text

Setting up the Contact Form DEMO

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Homework for you! • What if someone abused our mailing endpoint? • Use Azure API Management Consumption Plan for Request Throttling!

Slide 31

Slide 31 text

Resources • Storage Account Limits: https://drn.fyi/2NbC7Um • Increasing Storage Account Limits: https://drn.fyi/2NdO8Zp • Custom Domain Mapping for CDN: https://drn.fyi/2GQ1D0c Advanced request throttling with Azure API Management: https://drn.fyi/2Xbphdr

Slide 32

Slide 32 text

Thanks http://daron.me | @daronyondem Download slides here; http://daron.me/decks Sample code here; https://drn.fyi/2XbzK8D