docs: add Hasura Cloud Billing estimation docs

This PR adds user facing docs that explain how we calculate billing for our customers. It details which operations count in data passthrough based on which we charge customers.

Solves Jira issue: https://hasurahq.atlassian.net/browse/CPS-177

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6229
Co-authored-by: aayshasura <109507451+aayshasura@users.noreply.github.com>
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
GitOrigin-RevId: a0f0bcd5ee3f07b5e77c7c3768f55481f1aa6687
This commit is contained in:
Shraddha Agrawal 2022-11-07 23:02:00 +05:30 committed by hasura-bot
parent 78c36392eb
commit 4f0ee2a648
3 changed files with 57 additions and 3 deletions

View File

@ -0,0 +1,53 @@
---
description: Hasura Cloud data usage calculation
title: 'Cloud: Data Usage Calculation'
sidebar_label: Hasura Cloud Data Usage Calculation
keywords:
- hasura
- docs
- cloud
- payment
- additional charges
- data usage
- pricing
- data pass-through
sidebar_position: 4
---
import Thumbnail from '@site/src/components/Thumbnail';
import HeadingIcon from '@site/src/components/HeadingIcon';
# Hasura Cloud Data Usage Calculation
### How do we calculate data usage?
Hasura Cloud projects are billed based on the amount of data that passes through Hasura Cloud. This data corresponds to
the operations that are performed by you, your apps, or your clients.
The data pass-through is calculated by analyzing the logs that are sent from your project. All data transfer from Hasura
Cloud to external networks - such as your database server, external webhooks for [Actions](/actions/index.mdx),
[event triggers](/event-triggers/index.mdx), [scheduled triggers](/scheduled-triggers/index.mdx) or your
[Remote Schema](/remote-schemas/index.mdx) - is accounted for in Hasura Cloud billing.
We account for the following types of logs in Hasura Cloud data pass-through:
- `http-log`: The data usage is calculated by the request and response sizes of `http-log`. HTTP request size is
dependent on the size of cookies and request headers. Streamlining the response data will help reduce the HTTP
response size and corresponding data usage. Client-side errors like validation, query syntax, and rate-limiting errors
are not accounted for in billing.
- `ws-server`: The volume of data sent and received through a WebSocket connection is considered when calculating your
data usage. WebSocket connections are typically used for subscriptions. You can optimize the amount of data sent via
subscriptions to reduce `ws-server` data usage.
- `action-handler-log`: The sizes of the request and response of `action-handler-log` is taken into account for
calculating your data usage.
- `event-trigger-log`: The sizes of the request and response of `event-trigger-log` is taken into account for
calculating your data usage. This log is generated when Hasura triggers an external webhook.
- `scheduled-trigger-log`: The sizes of the request and response of the `scheduled-trigger-log` are taken into account
for calculating your data usage. The cost incurred by this depends on the frequency of scheduled triggers.
These logs are used to calculate your data usage in Hasura Cloud, which is then used for generating monthly invoices.
You can find more information about the pricing for data pass-through [on our pricing page](https://hasura.io/pricing/).

View File

@ -28,6 +28,7 @@ All Hasura Cloud billing related details can be found under the `Billing` tab in
## Details
- [Billing owner](/billing-owner.mdx)
- [Manage payment methods](/payment-methods.mdx)
- [Coupons and credits](/credits.mdx)
- [Receipts](/receipts.mdx)
- [Manage payment methods](/account-management/billing/payment-methods.mdx)
- [Coupons and credits](/account-management/billing/credits.mdx)
- [Receipts](/account-management/billing/receipts.mdx)
- [Data usage calculation for billing](/account-management/billing/billing-data-calculation.mdx)

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB