Goal

Load testing the VX Technology Chatbot 2.0 to prove scalability

Implementation Options

1. Pub/Sub with Cloud Functions


The general flow would be

  1. Create Pub/Sub topic (https://cloud.google.com/sdk/gcloud/reference/pubsub/topics/create)
  2. Create Pub/Sub subscription without --push-endpoint (https://cloud.google.com/sdk/gcloud/reference/pubsub/subscriptions/create)
  3. Publish messages containing JSON blob of data to replay (https://cloud.google.com/sdk/gcloud/reference/pubsub/topics/publish)
  4. Publish Cloud Functions (https://cloud.google.com/sdk/gcloud/reference/functions/deploy)
  5. Update Pub/Sub topic with "push" delivery method (https://cloud.google.com/sdk/gcloud/reference/pubsub/subscriptions/modify-push-config)
    1. This may take several minutes as per https://cloud.google.com/pubsub/docs/admin#change_pull_push
  6. Clean up resources once complete
    1. Unpublish cloud functions (https://cloud.google.com/sdk/gcloud/reference/functions/delete)
    2. Remove pub/sub subscription (https://cloud.google.com/sdk/gcloud/reference/pubsub/subscriptions/delete)
    3. Remove pub/sub topic (https://cloud.google.com/sdk/gcloud/reference/pubsub/topics/delete)


Cost Estimates

ItemUnitCost Per UnitQuantityTotalReference
​Cloud Functions​Invocations per month$0.00 (first 2 million)
​$0.0000004 (after 2 million)
< 2 million$0.00​https://cloud.google.com/functions/pricing
Cloud FunctionsGiB-second (Memory)$0.0000025 (Tier 1)


Cloud FunctionsGHz-second (CPU)$0.0000100 (Tier 1)


Cloud FunctionsEgress Data GiB-month$0.00 (first 5GiB)
$0.12 (after 5GiB)
< 5 GiB$0.00
Cloud FunctionsIngress Data GiB-month$0.00 (free)*$0.00
Container RegistryStorage GiB-month$0.026< 1$0.26https://cloud.google.com/container-registry/pricing#storage
Container RegistryNetwork Egress GiB-monthFree? 

https://cloud.google.com/storage/pricing#network-pricing
Container RegistryNetwork Ingress GiB-month$0.00 (free)*$0.00https://cloud.google.com/container-registry/pricing#storage
Cloud Buildbuild-minute
(e2-medium)
$0.000 (first 120 minutes per day)
$0.003 (after 120 minutes per day)
< 120$0.00https://cloud.google.com/build/pricing






Pub/SubGiB-month ingestion or delivery$0.00 (first 10 GiB)
$0.04 (after 10 GiB)
< 10 GiB$0.00https://cloud.google.com/pubsub/pricing
Pub/SubGiB-month storage$0.27< 1 GiB$0.27https://cloud.google.com/pubsub/pricing