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
- Very cheap
- Simple key-value or "file database"
- Limit for maximum number of operations
- Used by https://haveibeenpwned.com/
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 ...
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
- Make Fewer HTTP Requests
- Use a Content Delivery Network
- Add an Expires Header
- Gzip Components
- Put Stylesheets at the Top
- Put Scripts at the Bottom
- Avoid CSS Expressions
- Make JavaScript and CSS External
- Reduce DNS Lookups
- Minify JavaScript
- Avoid Redirects
- Remove Duplicate Scripts
- Configure ETags
- 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)
- Make Fewer HTTP Requests - ✅
- Use a Content Delivery Network - ✅
- Add an Expires Header - ✅
- Gzip Components - ✅
- Put Stylesheets at the Top - ⚠️
- Put Scripts at the Bottom - ⚠️
- Avoid CSS Expressions - ❌
- Make JavaScript and CSS External - ❌
- Reduce DNS Lookups - ✅
- Minify JavaScript - ✅
- Avoid Redirects - ✅/⚠️
- Remove Duplicate Scripts - ✅
- Configure ETags - ✅
- Make AJAX Cacheable - ❌
Other "small things"
- CDN
- DDoS
- SSL (auto-magic)
- WAF
- Image optimization
- AMP
Cloudflare
- CDN - FREE
- DDoS - FREE
- SSL (auto-magic) - FREE
- WAF - PRO
- Image optimization - PRO
- AMP - PRO
Total: $20/month
Need more? $200/month
Azure Frontdoor
- CDN - Standard
- DDoS - Premium
- SSL (auto-magic) - Standard
- WAF - Standard
- Image optimization - custom function
- 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
- 89