Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
crwilcox committed Jun 16, 2020
1 parent 211a969 commit dae8117
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions docs/getting-started/estimating-costs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
layout: default
---

NOTE: This is for informational purposes only. This doesn't account for all
costs of operating. It gives an approximate sizing of the cost.

# Estimating costs of hosting the Exposure Notifications Server

This page explains how you might estimate the cost to deploy servers within the
Expand Down Expand Up @@ -36,6 +39,8 @@ From which we can derive:
# Cloud Components and Pricing

## Cloud Run Costs
https://cloud.google.com/run/pricing

There are multiple containers needed for a complete deployment:

* Export Cleanup
Expand All @@ -54,25 +59,35 @@ Assuming we run ~4 containers constantly, which given the batch nature of many
may be a high estimate, and assuming we use the currently default terraform
resource limits of 2 CPU and 1G memory per container:

Projected Monthly Cost: 30 * 4 * ((2 * $2.0736) + (1 * $0.215)) = $523.46
**Projected Monthly Cost: 30 * 4 * ((2 * $2.0736) + (1 * $0.215)) = $523.46**

## SQL Database Costs
https://cloud.google.com/sql/pricing

The default size for SQL Database is configured to:
* 8 vCPU
* 30720 MB Memory
* 256 GB SSD

Configured Size in TF: "db-custom-8-30720" with 256GB Disk
Projected Monthly Cost (CPU): 30 * ($0.1180 per vCPU Hour * 24) * 8 vCPU = $679.68
Projected Monthly Cost (Memory): 30 * ($0.02 per GB Hour * 24) * 30 GB = $432
Projected Monthly Cost (SSD): ($0.170 per GB/month) * 256 GB = $43.52

Projected Monthly Cost: TBD
**Project Monthly Cost: $679.68 + $432 + $43.52 = $1155.20**

## Storage Costs
https://cloud.google.com/storage/pricing

### Data Storage Cost
$0.026 per GB

Projected Monthly Cost: ($0.026 / GB) * (0.00035 GB * 14 days) = $0 (fractional)
**Projected Monthly Cost: ($0.026 / GB) * (0.00035 GB * 14 days) = $0 (fractional)**

### Network Usage Cost
$0.12 per GB (egress)

Projected Monthly Cost: ($0.12 / GB) * (1.75GB/day * 30 days) = $6.30
**Projected Monthly Cost: ($0.12 / GB) * (1.75GB/day * 30 days) = $6.30**

### Operations Cost
There are two tiers of operations with different billing.
Expand All @@ -84,11 +99,15 @@ Relevant operations from this include `INSERT`, `UPDATE`, and `LIST`. These
will occur as part of batching of exposure keys. These operations will likely
remain under 10,000 for storage as creation of files is batched.

Projected Monthly Cost: $0.05
**Projected Monthly Cost: ~$0.05**

#### Class B
$0.004 per 10,000 operations

Relevant operations from this include `GET` requests for key batches.

Projected Monthly Cost: .004/10,000 * 60 Million = $24.00
**Projected Monthly Cost: 30 * ($0.004/10,000 Ops) * 5 Million Users = $60.00**

## CDN Costs

TBD

0 comments on commit dae8117

Please sign in to comment.