---
description:
  Rate limiting is a feature that allows you to limit the number of requests that can be made to
  your subgraph using `@rateLimit`
---

import { Callout } from '@theguild/components'

# Rate Limiting through `@rateLimit` directive

Rate limiting is a technique for reducing server load by limiting the number of requests that can be
made to a subgraph.

This approach follows the pattern of
[`graphql-rate-limit`](https://github.com/teamplanes/graphql-rate-limit/blob/master/README.md#field-config).

To set rate limit hints in your subgraph schema, the `@rateLimit` directive definition should be
included in the subgraph schema

<Callout>
  The gateway's rate limiting feature should be enabled.

[See here to configure Rate Limit plugin for Hive Gateway](https://the-guild.dev/graphql/hive/docs/gateway/other-features/security/rate-limiting)

</Callout>
