Platform-as-a-Service
Microsoft Windows Azure:
Transaction Processing and Availability
13.04.23 1TUM Informatik III: Datenbanksysteme Iwan Gulenko
Transaction Processing and Availability
13.04.23 2TUM Informatik III: Datenbanksysteme Iwan Gulenko
Availability
Conclusion
degree of detail
13.04.23 3TUM Informatik III: Datenbanksysteme Iwan Gulenko
Cloud Hierarchy
InfrastructureServer · Storage
IaaSPlatform
OS & Development Platform
InfrastructureServer · Storage
PaaSApps
PlatformOS & Development Platform
InfrastructureServer · Storage
SaaS
13.04.23 4TUM Informatik III: Datenbanksysteme Iwan Gulenko
IaaS PaaS SaaS
Provided service • Virtual machines and tools • Templates for virtual machines
• Software platform • Standard app(s)
Characteristics • Any OS / app installable
• Applications developed, deployed & managed on SW platform
• Usage of app• Customization of app
Benefits of PaaS over…
+ Less maintenance costs+ Security
+ flexibility + full control over app
Drawbacks of PaaS over…
- underlying hardware not accessable- Pricing
- costs for development and maintenance of app
Cloud Hierarchy
· FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL ·
Intr
anet
Inte
rnet
CustomerApplication
Customer
Vendor
IT of your company
Cloud
13.04.23 6TUM Informatik III: Datenbanksysteme Iwan Gulenko
Architecture
Beware of Buzzword
Bingo:=
Storage
13.04.23 7TUM Informatik III: Datenbanksysteme Iwan Gulenko
Storage
Queues -Background work processing-Publish/subscribe principle
RDBMS - Subset of SQL Server functionalities
Blobs – Large Data StoreDrives – NTFS Formatted Page Blobs (new)
Tables - Very Fast / Scalable Storage
<key, value>
13.04.23 8TUM Informatik III: Datenbanksysteme Iwan Gulenko
Storage
Name Birthday
Alice 10.10.1980
Bob 12.04.1987
Carl 02.03.1979
Favorite Food
Pizza
Flexible schema:
Massive scalability through partitions
UML visualization:
13.04.23 9TUM Informatik III: Datenbanksysteme Iwan Gulenko
Use Case: Event management web site Frequent user query: “List all events in my city.”
Storage
SeattleNY San
Fr.
Server 1
Server 1
Server 2
Load Balancing
Storage
13.04.23 10TUM Informatik III: Datenbanksysteme Iwan Gulenko
Storage
Queues -Background work processing-Publish/subscribe
RDBMS - Subset of SQL Server functionalities
Blobs – Large Data StoreDrives – NTFS Formatted Page Blobs (new)
Tables - Very Fast / Scalable Storage
<key, value>
13.04.23 11TUM Informatik III: Datenbanksysteme Iwan Gulenko
21
21
11
11
C1C1
C2C2
11
11
21
21
3340
40
Producers Consumers
P2P2
P1P1
30
30
11
11
21
21
10
10
20
20
Storage
11
11
20
20
Message M on Queue: Amount += 10 1. Worker Role A takes message M from Queue ( M
becomes invisible for other Worker Role instances) 2. Amount+= 10 3. VM Fails
After 30 sek : Message M visible to all Worker Role instances
1. Worker Role B takes message M from Queue ( M becomes invisible for other Worker Role instances)
2. Amount += 10 (we will be rich ) 3. Worker Role B removes message M from queue
13.04.23 12TUM Informatik III: Datenbanksysteme Iwan Gulenko
Storage
13.04.23 13TUM Informatik III: Datenbanksysteme Iwan Gulenko
21
21
11
11
C1C1
C2C2
11
11
21
21
3340
40
Producers Consumers
P2P2
P1P1
30
30
11
11
21
21
10
10
20
20
Storage
11
11
20
20
Make messages idempotent e.g. Implement optimistic concurrency (with timestamps)
At-least-Once
UPDATE Table1 Set Col1 = @NewCol1Value, Set Col2 = @NewCol2Value, Set Col3 = @TimestampWHERE Col1 = @OldCol1Value AND Col2 = @OldCol2Value AND Col3 = @Timestamphttp://msdn.microsoft.com/en-us/library/aa0416cz(VS.80).aspx
13.04.23 14TUM Informatik III: Datenbanksysteme Iwan Gulenko
Storage
Storage
13.04.23 15TUM Informatik III: Datenbanksysteme Iwan Gulenko
Storage
Queues -Background work processing-Publish/subscribe
RDBMS - Subset of SQL Server functionalities
Blobs – Large Data StoreDrives – NTFS Formatted Page Blobs (new)
Tables - Very Fast / Scalable Storage
<key, value>
13.04.23 16TUM Informatik III: Datenbanksysteme Iwan Gulenko
Application
InternetAzure Cloud
InternetAzure Cloud
LBLB
TDS (tcp)
TDS (tcp)
TDS (tcp)
Applications use standard SQL client libraries: ODBC, ADO.Net, PHP, …
Load balancer forwards ‘sticky’ sessions to TDS protocol tier
Security Boundary
SQL SQL SQL SQL SQLSQL
GatewayGateway GatewayGateway GatewayGateway GatewayGateway GatewayGateway GatewayGateway
Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to CloudDB
Scalability and Availability: Fabric, Failover, Replication, and Load balancingScalability and Availability: Fabric, Failover, Replication, and Load balancing
http://ecn.channel9.msdn.com/o9/pdc09/ppt/SVC12.pptx
Topology
13.04.23 17TUM Informatik III: Datenbanksysteme Iwan Gulenko
and ACID paradigm
Atomicity Transaction as an atomic operation Either all changes are persistently written or none
Consistency Consistent state of database after transaction In case of failure: Full Rollback (atomicity of transaction)
Isolation concurrent transactions not visible to each other Effects of concurrent transactions are the same as running in sequence
Durability transaction results won‘t be lost in case of failure
Table Storage SQL Azure
+ - + -
One query serves max 1000 entities
no limitations
Partition logic included
No app portability App portability Partition logic not included
No relational data store
Relational data store & stored procedures etc.
Table Storage SQL Azure
+ - + -
Scalability out of the box
Every transaction (CRUD) is charged
Transactions within the platform are not charged
No scalability out of the box:hard limit of 50 GB
suited for developing highly scalable, high volume apps
No ACID characteristics
ACID characteristics
More suited for smaller apps (which do not scale)
13.04.23 18TUM Informatik III: Datenbanksysteme Iwan Gulenko
5 SQL Azure: Table Storage vs. SQL Azure
13.04.23 19TUM Informatik III: Datenbanksysteme Iwan Gulenko
vs. Table Storage
Azure Tables SQL Azure
DDL REST, LINQ SQL Azure
DML <Key,Value> SQL
Consistency App has to handle this (Timestamp)
ACID
Availability Replication on fault domains
Replication
Partiton-Tolerance Out of the box App has to handle this
Scalability High scale out! App has to handle this
13.04.23 20TUM Informatik III: Datenbanksysteme Iwan Gulenko
Architecture
Beware of Buzzword
Bingo:=
Transaction Processing and Availability
13.04.23 21TUM Informatik III: Datenbanksysteme Iwan Gulenko
Availability
Conclusion
degree of detail
13.04.23 22TUM Informatik III: Datenbanksysteme Iwan Gulenko
Datacenters are located in…
13.04.23 23TUM Informatik III: Datenbanksysteme Iwan Gulenko
Datacenters are located in…
San AntonioSan AntonioChicagoChicago
ChicagoChicago
DublinDublin
AmsterdamAmsterdam
Hong KongHong Kong
SingaporeSingapore
North American Data CentersNorth American Data Centers European Data CentersEuropean Data Centers Asian Data CentersAsian Data Centers
13.04.23 24TUM Informatik III: Datenbanksysteme Iwan Gulenko
http://msdn.microsoft.com/en-us/magazine/dd727504.aspx
Roles: Discrete component built with managed code. One instance per VM your app runs in Web- and/or Worker Roles.
Web Role: user interaction (.aspx web pages) in ASP.NET or PHP
Worker Role: Computation (infinity loop, easy to implement) May be written in .NET, Ruby, Java Improve scalability by increasing parallelism and asynchronicity Used for background work
Web Role and Worker Role communicate over messages through Queues
13.04.23 25TUM Informatik III: Datenbanksysteme Iwan Gulenko
3 Transaction Processing: Web,- and Worker Role
13.04.23 26TUM Informatik III: Datenbanksysteme Iwan Gulenko
Demo: Developing an app for Azure
Transaction Processing and Availability
13.04.23 27TUM Informatik III: Datenbanksysteme Iwan Gulenko
Availability
Conclusion
degree of detail
13.04.23 28TUM Informatik III: Datenbanksysteme Iwan Gulenko
Availability
13.04.23 29TUM Informatik III: Datenbanksysteme Iwan Gulenko
“Principles of Transaction Processing”, Second Edition p. 23
*min. 2 instances of roles if you want the 99.9% SLA to apply…
Availability: Downtime
13.04.23 30TUM Informatik III: Datenbanksysteme Iwan Gulenko
Picture: Introducing Windows Azure, v1.2--Chappell.pdf p.22
Availability: Fault Domains
Use 3rd party monitoring provider:http://www.websitepulse.com/
Use our service dashboard:http://www.microsoft.com/windowsazure/
support/status/servicedashboard.aspx
13.04.23 31TUM Informatik III: Datenbanksysteme Iwan Gulenko
Availability: Monitoring
Transaction Processing and Availability
13.04.23 32TUM Informatik III: Datenbanksysteme Iwan Gulenko
Availability
Conclusion
degree of detail
Conclusion…
13.04.23 33TUM Informatik III: Datenbanksysteme Iwan Gulenko
· FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL ·
Intr
anet
Inte
rnet
CustomerApplication
Customer
Vendor
IT of your company
· FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL · FIREWALL ·
InternalWeb Application
Intr
anet
Inte
rnet
CustomerApplication
Customer
Vendor
Internal ProxyHigh level function
AzureCloud app. SQL
Azure
Azure Storage
Cloud app.
Service Bus
NAV
NAVWS
http://www.mygreatwindowsazureidea.com• “I was recently shocked to get my first Azure bill of over $250
for playing around with 3 one-page test sites. […] The dissapointment I encountered when I finally worked out Azure costs a minimum of $1000/year was OVERWHELMING. I'm just SAD, really. Why oh why do MS never think about the small time hobbyist up front?”
• “Among the factors used to calculate the bill is “compute time”. This latter factor, however, has a misleading name: it should be named “instance hosting time” not compute time.”
• “At $0.12/hour per instance, an app using N instances will be billed an average of 24*30*0.12*N/month = ~ $86/month per instance […]”
13.04.23 36TUM Informatik III: Datenbanksysteme Iwan Gulenko
• http://www.geekzone.co.nz/vs2008/6255 „Getting started with Windows Azure”• http://www.infosysblogs.com/microsoft/2010/03/
azure_table_storage_vs_sql_azu.html „Azure Table Storage Vs. SQL Azure“• http://sqlbits.com/Agenda/event4/
Comparing_Azure_storage_and_SQL_Data_Services/default.aspx „Comparing Azure storage and SQL Data Services”
• http://www.minddriven.de/?p=775 „Will Windows Azure succeed?“• http://msdn.microsoft.com/en-us/library/aa0416cz(VS.80).aspx „Using Optimistic
Concurrency“• http://msdn.microsoft.com/en-us/magazine/dd727504.aspx • „Patterns For High Availability, Scalability, And Computing Power With Windows
Azure”
• Introducing Windows Azure, v1.2--Chappell.pdf• “Principles of Transaction Processing”, Second Edition - Philip A. Bernstein, Eric
Newcomer
13.04.23 37TUM Informatik III: Datenbanksysteme Iwan Gulenko
8 Sources