Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Azure CosmosDB World Tour - ProxyVote

Azure CosmosDB World Tour - ProxyVote

You can find the code at https://aka.ms/proxyvote

Christopher MANEU

September 27, 2023
Tweet

More Decks by Christopher MANEU

Other Decks in Technology

Transcript

  1. Proxy Vote Designing scalable applications that costs a penny Christopher

    MANEU Principal Advocate Data Microsoft maneu.net
  2. Scalability requirements At time of building. As of Sept 2023:

    2.6M https://observatoire.numerique.gouv.fr/observatoire/
  3. Iteration 1: Start Simple Cloud Economics: Yearly cost ~ 3000€

    Cost per proxy voting Paper Proxy Voting (1 A4 paper sheet) 0.00304 € / vote 0.00886 €/ vote Iteration 1 Voting x2.9
  4. Iteration 1 Takeaways Cheaper than Paper-based Unknown scalability App service

    can autoscale up to 10 instances PostgreSQL Flexible Server can scale. Uneven usage throughout day/week/month. Long no-usage periods
  5. Iteration 2: Serverless architecture Process / Steps Function invocation Cosmos

    DB RUs Register Proxy Voter Access the homepage 0 0 Login (State OpenId) 0 0 View Application Form 0 0 Submit Application 1 6 - C Validate Application email 1 1 - R Validate Application Identity Access internal app homepage 0 0 Search application by Id 1 1 – R Validate application 1 6 - C Total 4 14
  6. Iteration 2: Serverless Cloud Economics: Cost at @1M Reg: ~5€

    / year, @3M: ~15€ Cost per proxy voting Paper Proxy Voting (1 A4 paper sheet) 0.00304 € / vote 0.00886 €/ vote Iteration 1 Voting x672 0.00000452 € / vote Iteration 2 Voting
  7. Iteration 2 Takeaways Scalability predictable Cosmos DB Serverless Max RU/s:

    5000-20000 From 0 to 800-3200 applications / s instantly, 0 engineering effort All France yearly application can be processed in <14 minutes, for less than 15€