How to become an architect in the cloud?

 Architecture + Cloud + FinOps = <3

Who am I?

Piotr Stapp

  • Unique name - just sing a song: "Don't Stapp me know" ;)
  • CEO @ Dotnetomaniak
  • Author @ PoznajKubernetes & PoznajDocker
  • ex - Senior software/DevOps/Architect @mBank/@FinAi/@Allegro
  • SAFe System Principal Architect @ Demant Technology Center
  • M.Sc (distction) Oxford Brooks University in Web Tech
  • M.Sc. Warsaw University of Technology in Computer Science
  • And ......

Agile -> Scrum -> SAFe

Who are you?

Use the phone, Luke!

Favorite cloud

Cloud results after voting 🙈🙊🙉

Context

Numbers

  • 5k - 50k - 500k ? (Wembley Stadium == 90k)
  • A few important LIVE sessions (e.g. contest finals)
  • Peak usage
  • $$$ is very important

Architecture

TODO list

  • Hosting
  • Database
  • Users data (accounts + passwords)
  • To SPA or not to SPA? That is the question!
  • Man power

Soft(ware) decisions

To containerize or
not to containerize 

Which JavaScript framework is the best?

User Data Storage
accounts and passwords

Old days

Receipe

  • Take one technology that you <3
  • Apply the first tutorial about user accounts
  • Or copy some stuff from previous project

My case

  • .NET Framework (a good one)
  • Avoided problems:
    • Passwords with base64
    • SQL injection
  • In PHP, NodeJS, Java, .... - situation is simmilar

Seriously!

Today

The incomplete list

  • Dedicated tools for user management:
    • Active Directory
    • OpenLDAP
    • ...
  • Ready to deploy and use:
    • Keycloak,
    • Identity Server 4
    • ...
  • SaaS:
    • Auth0
    • Userbase
    • Azure B2C

Candidates

"Self-hosted"

  • My own with NuGet / Maven / NPM / pip / ... support
  • Active Directory / OpenLDAP / ...
  • Keycloak / Identity Server 4 / ...

 

SaaS

  • SaaS outside Azure: Auth0
  • "SaaS" inside Azure:  Azure B2C
  • Totally "unknow" SaaS: Userbase

SaaS Features

  • Facebook / Twitter / Github / .... login
  • MFA with application and SMS
  • FIDO2
  • Custom domain
  • Custom CSS
  • ....

Money

"Have I Been Pwned"?

My decision was affected by

Hosting

The incomplete list

No containers

  • Azure Web App
  • Azure Storage + Azure CDN + ...
  • Azure Functions
  • Azure SignalR + static web page + X
  • Virtual Machine

Containers

  • Azure Container Instances
  • Azure Kubernetes Service (AKS)
  • Azure Container Apps
  • Azure Web App
  • Virtual machine

Upfront + static costs

No containers

  • Azure Web App
  • Azure Storage + Azure CDN + ...
  • Azure Functions
  • Azure SignalR + static web page + X
  • Virtual Machine

Containers

  • Azure Container Instances
  • Azure Kubernetes Service (AKS)
  • Azure Container Apps
  • Azure Web App
  • Virtual machine

Easy to scale up

No containers

  • Azure Web App
  • Azure Storage + Azure CDN + ...
  • Azure Functions
  • Azure SignalR + static web page + X
  • Virtual Machine

Containers

  • Azure Container Instances
  • Azure Kubernetes Service (AKS)
  • Azure Container Apps
  • Azure Web App
  • Virtual machine

Easy to scale down

No containers

  • Azure Web App
  • Azure Storage + Azure CDN + ...
  • Azure Functions
  • Azure SignalR + static web page + X
  • Virtual Machine

Containers

  • Azure Container Instances
  • Azure Kubernetes Service (AKS)
  • Azure Container Apps
  • Azure Web App
  • Virtual machine

Cost per request

No containers

  • Azure Web App
  • Azure Storage + Azure CDN + ...
  • Azure Functions
  • Azure SignalR + static web page + X
  • Virtual Machine

Containers

  • Azure Container Instances
  • Azure Kubernetes Service (AKS)
  • Azure Container Apps
  • Azure Web App
  • Virtual machine

DevEx

No containers

  • Azure Web App
  • Azure Storage + Azure CDN + ...
  • Azure Functions
  • Azure SignalR + static web page + X
  • Virtual Machine

Containers

  • Azure Container Instances
  • Azure Kubernetes Service (AKS)
  • Azure Container Apps
  • Azure Web App
  • Virtual machine

Enough?

Voting (multiple)

What?

Database

Small recap

  • Usage won't be "stable"
  • There will be usage peaks
  • A few days will have much more load than the rest of month/year

Conclusions

  • We cannot predict what will happen
  • Performance should be stable, but usage is a time function
  • Probably a lot of data will be static and can be handled by cache

NoSQL

  • Great, isn't it?
  • New, isn't it?

SQL

  • Solid, isn't it?
  • Well known, isn't it?

Options

  • Self-hosted "custom" one on VM's
  • Azure Storage
  • Cosmos DB
    • "Native"
    • Mongo
    • GraphQL
    • ....
  • SQL as a Service
    • MSSQL
    • Postgres
    • MySQL
    • MariaDB

Custom stuff on VM's

Before you decide, you should know

  • why PaaS DB won't work for you
  • how to manage this custom stuff

 

Azure Storage

In other words, if I want 100GB of storage and I want to hit it 10 million times, it’ll cost me $8 a month.

Azure SQL for ...

  • MSSQL, MySQL, MariaDB and Postgres
  • Pricing:
    • DTU versus vCore (Pricing)
    • Single Server vs. Flexible vs. Hyperscale (Pricing
  • Dynamic scaling? Yes, but ...

Cosmos DB

  • "SQL", API for MongoDB, Gremlin, Cassandra, Table, ...
  • Key-vaule, Column-Family, Documents, Graph
  • Pricing:
    • Standard
    • Auto-scale
    • Serverless
  • Dynamic scaling? Yes!!
  • No relations 🙊🙉🙈

What about ...

  • DB2🙈 (check: IBM DB2 Azure Virtual Machines DBMS)
  • Oracle 🙉 (check: Oracle Database Service for Microsoft Azure)
  • Redis🙊 (check: Azure Cache for Redis)
  • ....

Options

  • Self-hosted "custom" one on VM's
  • Azure Storage
  • Cosmos DB
  • SQL as a Service

Voting

Small things

14 Rules by Steve Sounders

  1. Make Fewer HTTP Requests
  2. Use a Content Delivery Network
  3. Add an Expires Header
  4. Gzip Components
  5. Put Stylesheets at the Top
  6. Put Scripts at the Bottom
  7. Avoid CSS Expressions
  8. Make JavaScript and CSS External
  9. Reduce DNS Lookups
  10. Minify JavaScript
  11. Avoid Redirects
  12. Remove Duplicate Scripts
  13. Configure ETags
  14. Make AJAX Cacheable

Small "things"

  • HTTP/2 (or even HTTP/3)
  • SSL certificate
  • First Contentful Paint
  • CDN++
  • And some points from 14 Rules for Faster-Loading Web Sites

Cloudflare (free)

  1. Make Fewer HTTP Requests - ✅
  2. Use a Content Delivery Network -  
  3. Add an Expires Header -
  4. Gzip Components -
  5. Put Stylesheets at the Top - ⚠️
  6. Put Scripts at the Bottom - ⚠️
  7. Avoid CSS Expressions -
  8. Make JavaScript and CSS External - ❌
  9. Reduce DNS Lookups - ✅
  10. Minify JavaScript - ✅
  11. Avoid Redirects - ✅/⚠️
  12. Remove Duplicate Scripts - ✅
  13. Configure ETags -
  14. Make AJAX Cacheable -

Other "small things"

  1. CDN
  2. DDoS
  3. SSL (auto-magic)
  4. WAF
  5. Image optimization
  6. AMP

Cloudflare

  1. CDN - FREE
  2. DDoS - FREE
  3. SSL (auto-magic) - FREE
  4. WAF - PRO
  5. Image optimization - PRO
  6. AMP - PRO

 

Total: $20/month

Need more? $200/month

Azure Frontdoor

  1. CDN - Standard
  2. DDoS - Premium
  3. SSL (auto-magic) - Standard
  4. WAF - Standard
  5. Image optimization - custom function
  6. AMP - custom function

 

Total: $35/month - Standard
          $330/month - Premium 

          + custom code 🤪

Voting

The end?

Our amazing design!

Generate design

description using AI

Your design is like dance.

Generating perfect image....

Visualization 

Questions?

How to become an architect in the cloud

By Piotr Stapp

How to become an architect in the cloud

  • 92