0%
SupportGetting Started
What are Compute Units (CU) and Throughput Compute Units (CUPs)?

What are Compute Units (CU) and Throughput Compute Units (CUPs)?

Written by Author headshotKilliane Menand
Published on August 1, 20242 min read

At Alchemy, we measure your usage in two key dimensions to provide flexibility and control over your blockchain interactions:

  1. Compute Units (CU): 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.

  2. Throughput Compute Units (CUPs): Each application has reserved dedicated Throughput, measured in Compute Units per Second. Applications can greatly exceed their dedicated throughputs based off of elastic demand in our system. 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 212 CUPS. Note that even if your application limit is 200 CUPS, this throughput will likely be allowed still by the system.

Consider a free-tier Alchemy account, which includes the following limits:

  • Total Compute Units: 300 million CUs per month.

  • Throughput: 330 CUPs.

For instance, the getNFTMetadata method consumes 100 CUs and 10 Throughput CUs (CUPs). This means:

  • You can call getNFTMetadata up to 3 million times a month, given it's CUs cost of 100 CUs.

  • You can execute up to 33 calls per second, given its throughput cost of 10 CUPs

  • Exceeding Compute Units: If you exceed the preset limits of your account tier (e.g., 300M CUs on the free tier), you can enable the Auto-scale feature starting on Growth tier. This feature automatically allocates additional CUs based on your app’s needs, ensuring uninterrupted service. Learn more about Auto-scale and how it applies to different account tiers here: Auto-Scale Compute.

  • Exceeding Throughput Compute Units: Exceeding your throughput limit typically results in a 429 error code. To efficiently handle these errors, implementing retries is recommended. The Alchemy SDK includes built-in retries, making it easier to manage request retries effectively. Further details on managing throughput can be found in our documentation: Throughput Documentation.

To better plan and manage your application’s consumption of resources, you can view detailed CU and CUPs costs per endpoint on our documentation page. This will help you understand the specific costs associated with each API call you make. Visit the Compute Unit Costs page for complete details: Compute Unit Costs.

Was this article helpful?
Share:
Banner background image

Not finding what you need?