Docs
Launch GraphOS Studio

Throughput guide

Understand GCU performance and scaling


Cloud is currently in invite-only preview. Don't hesitate to get in touch if you'd like to request access or have any questions or feedback.

This guide covers:

  • An overview of Graph Compute Units () and their performance expectations
  • How to calculate the number of your needs
  • How to manage your 's throughput capacity as needs change

Overview

Cloud pricing is based on the amount of Graph Compute Units () needed to run your . A GCU is a unit of throughput capacity that takes into account:

  • Processing incoming requests
  • Making a across s
  • Securely routing traffic to your backend services

run on AWS in the region of your choice.

Performance expectations

While Cloud is in preview, these performance expectations may change.

From a single , you can expect the following baseline performance:

  • 25 requests per second (RPS)
  • 150 RPS
  • Up to 0.5 megabytes of response data per second

performance varies depending on additional factors, such as payload size. For example, requests that return large payloads may decrease throughput below the baseline 25 RPS. Conversely, requests that return small amounts of data may achieve above the baseline 25 RPS.

Apollo recommends load testing your workload on Cloud before going into production.

Throughput factors

Beyond RPS, complexity and response size influence throughput. For example, the following scenarios would decrease relative GCU throughput:

  • Requests that more than five s
  • Requests that return hundreds or thousands of per

Requests like this decrease throughput because they require additional compute resources to execute. Factor in additional into your GCU calculation if your receives complex queries or returns large responses.

NOTE

include burst capacity to handle the occasional complex . A sustained period of complex queries can exhaust this capacity.

Rate limiting

aren't rate-limited. However, GCUs do offer a specific amount of throughput capacity. It's possible to temporarily burst GCU throughput for a few seconds. After this period, clients receive 429 errors. Apollo recommends adding retry logic to your clients to minimize dropped requests.

GCU calculation

If you already use , you can calculate your required using the metrics in .

  1. In Studio, go to the Insights page and select Last month as the timeframe.
GraphOS Studio Insights page with timeframe selection
  1. Scroll down to the Request Rate chart. This chart shows the request rate in requests per minute (RPM).
  2. To calculate your required requests per second (RPS), find the peak RPM and divide it by 60.
  3. Since, as a baseline, 1 can serve 25 RPS, divide your peak RPS by 25 to calculate your required GCUs.
GraphOS Studio Insights Request Rate chart with highlighted peak
  • In the example above, the peak is 19,000 RPM.
  • 19,000 / 60 = 317, so the has a peak of 317 RPS.
  • 317 / 25 = 13, so this workload requires at least 13 GCUs to operate.

NOTE

Factor in additional if your serves complex or large requests.

Load testing

Before going into production on Cloud , Apollo highly recommends running a load test to simulate production traffic. For example, suppose you run a load test of 10% of a typical day's traffic, which runs well on a single . That means you need at least 10 GCUs to operate your on a typical day.

trials are available to help you run a load test for free. Get in touch to start a trial.

Manage capacity

Cloud supports mission-critical production workloads, and you can scale performance to meet the needs of your APIs. Dedicated supports up to 10 per .

starts with 1 per . You can change a variant's GCUs via either:

NOTE

updates takes about one minute to provision.

Edit GCUs in Studio

You can change a 's from the Cloud Router page in Studio. Click Manage Capacity to the right of Router Capacity.

GraphOS Studio managed GCUs

Then, select the number of required and click Save changes.

GraphOS Studio edit GCUs

Edit GCUs via API

You can change a 's with the following from the GraphOS Platform API.

mutation Graph($graphId: ID!, $name: String!, $gcus: Int!) {
graph(id: $graphId) {
variant(name: $name) {
router {
setGcus(gcus: $gcus) {
... on RouterGcusSuccess {
order {
id
}
}
}
}
}
}
}

This requires setting the following :

  • graphId: a 's ID is the first part of the graph's
    • You can a 's ID in under Settings > This Graph
  • name: the name
    • If you haven't set a name, the default is current
  • gcus: the number of to provision for the
Previous
Quickstart
Next
Custom domains
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company