building a saas based product in azure - challenges and decisions made
TRANSCRIPT
![Page 1: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/1.jpg)
Saravana KumarMicrosoft Azure MVP (since 2007)Founder – BizTalk360, ServiceBus360@saravana
mv
![Page 2: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/2.jpg)
Building a SaaS based product in AzureChallenges and decisions made…
![Page 3: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/3.jpg)
Our SaaS Products
https://biztalk360.cloud https://servicesbus360.com
![Page 4: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/4.jpg)
What is a SaaS product?
![Page 5: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/5.jpg)
Key characteristics of SaaS products• Scalable – both technically and financially• Reliable - Cannot afford to have a downtime• Smooth on-boarding• Tenants are isolated• Less Time to troubleshoot and fix• Continuous delivery• Less friction on payment
![Page 6: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/6.jpg)
Main Azure Building Blocks
Azure App Services Azure Event Hubs
Azure WebjobsAzure SQL Elastic Pool
Azure Storage Azure Key Vault
Azure SQL Database
![Page 7: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/7.jpg)
External Building Blocks
![Page 8: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/8.jpg)
BizTalk360 Cloud (High Level Design)
Event HubProcessor
CustomerProvision
Email Manager
PurgeManager
PaymentManager
PurgeManager
HealthManager
UserManager
Core Web Jobs
Customer Specific Web Jobs SQL Elastic pool (per customer)
Core Database
Web Interface (Azure App Service)
Customer
Customer
Customer
Customer
Customer
![Page 9: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/9.jpg)
ServiceBus360 (High Level Design)
CustomerProvision
Email Manager
PurgeManager
PaymentManager
PurgeManager
HealthManager
UserManager
Core Web Jobs
Customer Specific Web Jobs SQL Elastic pool (per customer)
Core Database
Web Interface (Azure App Service)
Customer
Customer
Customer
Customer
Customer
Customer Azure Subscription
Customer Azure Subscription
Customer Azure Subscription
![Page 10: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/10.jpg)
Agent – Event Hub
BizTalk Agent
Event Hub ProcessorsInstance 1
Event Hub ProcessorsInstance 2
Core Database
SQL Elastic pool (per customer)
![Page 11: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/11.jpg)
Event Hub –What problem does it solve?• You don’t need to worry about message
ingestion into Azure
• Without Event Hubs the solution would have been complex with • Load balanced Web API• Scaling based on demand
![Page 12: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/12.jpg)
Agent - challenges to address
• Two-way communication•Ability to Force shut down•Ability to push updates•Ability to change Event Hub end points•Ability to notify local errors to the server•Ability to inform self health
![Page 13: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/13.jpg)
Event Hub Processor (challenges)• 2 Instances of Event Hub Processors
• Partitions are leased between these two instances
• When one goes down, all the partition leases are allocated to the active Instance automatically by the Event Hub Processor Factory
![Page 14: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/14.jpg)
Storing Customer(s) Data
![Page 15: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/15.jpg)
What are the options?• Single Database – all tenants in one database• PROS: Easy to implement, Fast deployment• CONS: Security, Scalability
• Isolated Databases – single database per tenant• PROS: Security, Scalability• CONS: Harder to Deploy, Manage, Cost
predictability
![Page 16: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/16.jpg)
We decided to go with Isolated Databases
Challenges to Address• Ability to run jobs (custom scripts) against all
databases• Ability to query consolidated data across all
databases• Avoid unnecessary cost for unused accounts• Cost Predictability
![Page 17: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/17.jpg)
Azure SQL Elastic Pool – is the Solution
![Page 18: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/18.jpg)
Azure SQL Elastic Pool – core benefits
• Designed for SaaS applications
• Can have mixture of small and large databases within the pool depending on customer size
• Simple costing model
![Page 19: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/19.jpg)
• There are limits on total number of databases you can have in the pool
•Cost is something to note, even though it’s consumption only model, the base price itself is quite high, maintaining staging, dev environments are challenging
Things to note with SQL Elastic Pool
![Page 20: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/20.jpg)
Techniques for smooth customer on-boarding
![Page 21: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/21.jpg)
Event Hub Processor Instances
Customer Provisions
EmailManager Purge
Manager
Payment Manager
SQL PoolManager
Utility User Manager
Core WebjobsCustomer Webjobs
DataBases
Pool Provisioned
Customer DB PoolCore DB
Customer DB Provisioned
Provisioning When New Customer Sign up and activate the account
New Customers
![Page 22: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/22.jpg)
Payment Processing
![Page 23: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/23.jpg)
•Not storing the credit card details PCI compliance
•Ability to handle • Recurring billing, • Cancellations, • Refunds, • Upgrade/downgrades,• Dunning (retry payment)• VAT
Things to look
![Page 24: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/24.jpg)
Don’t build your own
ChargeBee (subscription billing)
PaymentGateway
![Page 25: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/25.jpg)
Bank Account
Web API Notifications like successful payment, failed
payment, card expired are posted to our application via the Web API from ChargeBee
How does it work?
![Page 26: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/26.jpg)
![Page 27: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/27.jpg)
EmailProcessing
![Page 28: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/28.jpg)
Host InstancesOrchestrationsReceive LocationsSend Ports
Customer DB
Monitoring Service
(CustomerWebjob)
Core DB
Email Manager(Core Webjob)
![Page 29: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/29.jpg)
Deployment Process - Visual Studio Team Services
![Page 30: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/30.jpg)
• Full development build• Front End Back End Development• Full Staging build• Front End Back End Staging• Full master staging – Sync up• Full Production Build• Front End Back End Production
Multiple Build Definitions
![Page 31: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/31.jpg)
![Page 32: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/32.jpg)
![Page 33: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/33.jpg)
Naming Conventions
![Page 34: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/34.jpg)
Follow correct naming conventions right from the beginning• sb360-prod-rg• sb360-prod-appsvc-frontend• sb360-prod-appsvc-backend• sb360-prod-appsvc-backend-mon• sb360-prod-appsvcplan-frontent • sb360-prod-appsvcplan-backent• sb360-prod-appsvcplan-backend-mon • sb360-prod-servicebus• sb360-prod-servicebus-eventhub• sb360-prod-sql-elasticpool• sb360-prod-sql-server• sb360-prod-sql-coredb• sb360-prod-storage
![Page 35: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/35.jpg)
Active Directory or Simple Username/Password
![Page 36: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/36.jpg)
36Integrating with Active Directory Authentication
![Page 37: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/37.jpg)
37Resorted back to Forms Authentication
![Page 38: Building a SaaS based product in Azure - Challenges and decisions made](https://reader036.vdocuments.net/reader036/viewer/2022062523/5888478b1a28ab951c8b4609/html5/thumbnails/38.jpg)
Thank You – Get Started
One Platform.Operations, Monitoring, Analytics software for Azure Service Bus
Get started with a free accountwww.servicebus360.
com