Skip to content

High KV write unit usage on Deno Deploy #10

@jakewhelan

Description

@jakewhelan

Here's some stats on the current cost of using done

According to /v1/admin/stats I have pushed ~1652 messages through the service, there were some retries in there for sure but it's not communicated in the /v1/admin/stats payload so I don't know how many.

The resulting cost was ~150k Deno Deploy KV write units, or 136MB of write data - 80KB of writes per message processed on average. The done payload sent with each message is very small: a callback URL, headers, and sometimes a body of ~1KB.

For comparison, the rest of my platform (~3 small services) consumed 6k Deno Deploy kv write units, collectively. These services are handling the callbacks from the queue, and storing the actual data output of the jobs.

My gut feel here is that something is wrong about how much it costs to run done, what is it writing that consumes so many KV units?

Based on the current Deno Deploy pricing and my workload, it will cost ~$2.50 USD per 100k messages or $25 USD per 1m messages. I know it's not a perfect example, but that is 60x more expensive than AWS SQS ($0.4 USD per million).

image
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions