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

Codemotion DevsLunchBox - Cloud Run

Codemotion DevsLunchBox - Cloud Run

Mete Atamel

March 31, 2020
Tweet

More Decks by Mete Atamel

Other Decks in Programming

Transcript

  1. Container to production in seconds Natively Serverless One experience, where

    you want it Cloud Run Bringing serverless to containers
  2. HTTPS Endpoint Public • Website • API endpoint Private •

    Internal services • Async tasks • Mobile backend • Webhook
  3. Container contract Listen on 0.0.0.0 on port $PORT (default 8080)

    HTTP server must start < 4 min (timeout → 504) Request time < 15 min (default → 5 min) Stateless (in-memory file system, doesn’t persist) Computation only within request (No background activity)
  4. Container resources 1 vCPU per container instance (configurable to 2vCPU)

    256 MiB of memory up to a max of 2 GiB (configurable) 80 concurrent requests per container (configurable 1-80) 1000 max containers by default (configurable 1-1000) Access to a Metadata Server Sandboxed by gVisor
  5. Billable time Instance Billable Time Request 1 Start Request 1

    End Request 2 Start Request 2 End Instance Time Billable Non-billable
  6. Services part of async tasks Cloud Tasks user_registration user_levelcompleted user_inapppurchase

    user_statechange Daily activity metrics service User profile service Payment processing service Game state service