Skip to content

Latest commit

 

History

History
111 lines (91 loc) · 4.79 KB

compute-units.md

File metadata and controls

111 lines (91 loc) · 4.79 KB
description
Explanation for what Compute Units are and how we use them.

🔩 Compute Units (CUs)

Compute units are a measure of the total computational resources your apps are using on Alchemy. You can think of this as how you would pay Amazon for compute usage on AWS. Some queries are lightweight and fast to run (e.g., eth_blockNumber) and others can be more intense (e.g., large eth_getLogs queries). Each method is assigned a quantity of compute units, derived from global average durations of each method.

We're obsessed with providing the most developer-friendly experience across our platform, and this doesn't stop at pricing. Pricing on compute units allows us to provide developers with the most fair and transparent pricing possible. No more over-paying for simple requests, you only pay for what you use, period.

Raw Method Costs

Method CU
eth_uninstallFilter 10
eth_accounts 10
eth_blockNumber 10
eth_chainId 10
eth_protocolVersion 10
eth_syncing 10
net_listening 10
net_version 10
eth_subscribe 10
eth_unsubscribe 10
eth_getTransactionReceipt 15
eth_getUncleByBlockHashAndIndex 15
eth_getUncleByBlockNumberAndIndex 15
eth_getTransactionByBlockHashAndIndex 15
eth_getTransactionByBlockNumberAndIndex 15
eth_getUncleCountByBlockHash 15
eth_getUncleCountByBlockNumber 15
web3_clientVersion 15
web3_sha3 15
alchemy_getTokenMetadata 16
eth_getBlockByNumber 16
eth_getStorageAt 17
eth_getTransactionByHash 17
trace_get 17
alchemy_getTokenAllowance 19
eth_gasPrice 19
eth_getBalance 19
eth_getCode 19
eth_getFilterChanges 20
eth_newBlockFilter 20
eth_newFilter 20
eth_newPendingTransactionFilter 20
eth_getBlockTransactionCountByHash 20
eth_getBlockTransactionCountByNumber 20
eth_getProof 21
eth_getBlockByHash 21
trace_block 24
parity_getBlockReceipts 24
eth_getTransactionCount 26
eth_call 26
alchemy_getTokenBalances 26
trace_transaction 26
eth_getFilterLogs 75
eth_getLogs 75
trace_call 75
trace_callMany 75
trace_rawTransaction 75
trace_filter 75
eth_estimateGas 87
alchemy_getAssetTransfers 150
eth_sendRawTransaction 250
debug_traceTransaction 309
trace_replayTransaction 2983
trace_replayBlockTransactions 2983

WebSocket and Webhook Costs

Webhook and WebSocket subscriptions on Alchemy are priced based on bandwidth: the amount of data delivered as part of the subscription.

Each subscription type is priced identically, per byte:

Bandwidth CU
1 byte .04

On average, a typical webhook or WebSocket subscription event is about 1000 bytes, so would consume 40 compute units. Note that this can vary significantly based on the specific event delivered (alchemy_newFullPendingTransactions subscription type has a much higher compute unit cost than others).

On-Demand Compute (Growth Tier Only)

Turning on autoscale gives you instant access to on-demand compute at volume discounts. No more worrying about your node going down due to a spike in traffic, or even waiting days for new nodes to sync. Autoscale gives you infinite scalability at affordable prices.

Monthly Compute Units (CU) Price Per Unit
0-50,000,000 $0.00
50,000,000-75,000,000 $0.0000040 ($4.00/1M CU)
75,000,000-125,000,000 $0.0000032 ($3.20/1M CU)
125,000,000-275,000,000 $0.0000025 ($2.50/1M CU)
275,000,000-525,000,000 $0.0000020 ($2.00/1M CU)
525,000,000-1,025,000,000 $0.0000016 ($1.60/1M CU)
1,025,000,000+ $0.0000012 ($1.20/1M CU)

Rate Limits (CUPS)

Rate Limits serve to protect users from malicious actors or runaway scripts. Each tier has prioritized rate limit allocations designed for ultimate reliability.

CUPS are a measure of the number of compute units used per second when making requests. Since each request is weighted differently, we base this on the total compute units used rather than the number of requests.

For example, if you send one eth_blockNumber (10 CUs), two eth_getLogs (75 CUs), and two eth_call (26 CUs) requests in the same second, you will have a total of 310 CUPS.

User CUPS
Free 330
Growth 660
Enterprise Custom

If you are experiencing rate limits, or want create a more robust and reliable experience for your users, we recommend implementing retries.