$30 off During Our Annual Pro Sale. View Details »

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

    View Slide

  2. View Slide

  3. How Proxy voting works?

    View Slide

  4. View Slide

  5. ProxyVote

    View Slide

  6. Scalability requirements
    https://observatoire.numerique.gouv.fr/observatoire/

    View Slide

  7. Scalability requirements
    At time of building. As of Sept 2023: 2.6M https://observatoire.numerique.gouv.fr/observatoire/

    View Slide

  8. Iteration 1: Start Simple
    PostgreSQL
    database
    App Service

    View Slide

  9. Cost-based architecture

    View Slide

  10. 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

    View Slide

  11. 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

    View Slide

  12. Iteration 2: Serverless architecture
    Cosmos DB (SQL)
    Database
    Serverless APIs
    Static Front

    View Slide

  13. 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

    View Slide

  14. 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

    View Slide

  15. 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€

    View Slide

  16. https://aka.ms/proxyvote

    View Slide

  17. Q&A
    Christopher MANEU
    maneu.net

    View Slide