Skip to main content
Version: v3.x (DDN)

Connector Deployment Resources

Introduction

Connectors in Hasura DDN can request specific resources for their deployment. These include memory and CPU allocation. Understanding these limits ensures optimized performance and cost efficiency.

Default Resource Allocation

By default, connectors have the following resource allocations:

  • CPU: 100m (0.1 vCPU)
  • Memory: 256Mi

Note: For Public DDN, resource limits are fixed to 1 vCPU and 2GB RAM and cannot be modified.

Maximum Resource Limits

Connectors can request resources within the following limits:

  • Maximum CPU: 4 vCPU
  • Maximum Memory: 32Gi

These maximum limits can be increased upon request. Contact Hasura support if you need higher resource limits.

Memory and CPU Specifications

Memory and CPU resources are specified using the same units as Kubernetes:

  • Memory Resource Units

Limits and requests for memory are measured in bytes. Memory can be expressed as a plain integer or as a fixed-point number using one of the following quantity suffixes:

  • E, P, T, G, M, k (base-10 units)
  • Ei, Pi, Ti, Gi, Mi, Ki (power-of-two units)

For example, the following values represent approximately the same amount of memory:

  • 128974848, 129e6, 129M, 128974848000m, 123Mi

Note: Pay attention to the case of the suffixes. If you request 400m of memory, this means 0.4 bytes, which is likely a mistake. Instead, you might intend to specify 400Mi (400 mebibytes) or 400M (400 megabytes).

  • CPU Resource Units

Limits and requests for CPU resources are measured in CPU units. In Hasura DDN, 1 CPU unit is equivalent to 1 physical CPU core or 1 virtual core, depending on whether the node is a physical host or a virtual machine.

Fractional requests are allowed. When a connector specifies cpu: 0.5, it is requesting half as much CPU time compared to 1.0 CPU. For CPU resource units, the quantity 0.1 is equivalent to 100m, which can be read as "one hundred millicpu." Some refer to this as "one hundred millicores," and it is understood to mean the same thing.

CPU resources are always specified as an absolute amount, never as a relative amount. For example, 500m CPU represents the same amount of computing power whether the connector runs on a single-core, dual-core, or multi-core machine.

Defining Resource Limits in connector.yaml

Resource limits can be set at both the top level and per region.

title: "Example connector.yaml configuration"
kind: Connector
version: v2
definition:
name: my_connector
resources:
memory: 128M
cpu: 0.5
regionConfiguration:
- region: us-central1
resources:
memory: 128M
cpu: 2

Resource Limit Overrides

When resource limits are defined at both the top level and the region level, the region-specific values take precedence over the top-level values for that particular region.

For example, if a connector is configured as follows:

definition:
resources:
memory: 512M
cpu: 1
regionConfiguration:
- region: us-central1
resources:
memory: 128M
cpu: 2
  • In us-central1, the connector will have 128MB memory and 2 vCPUs, overriding the top-level 512MB memory and 1 vCPU settings.
  • In any other region not explicitly defined, the top-level values (512MB memory, 1 vCPU) will apply.

This allows for fine-grained control over resource allocation based on deployment needs.

Deployment Considerations

  • If no region is specified for a connector, it is deployed to a random region.

By optimizing resource configurations, connectors can achieve optimal performance while maintaining cost efficiency in Hasura DDN.