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: 1 vCPU
  • Memory: 2GB RAM

Custom Resource Limits

Resource limits can only be modified for Private DDN. For Public DDN, the resource limits are fixed to 1 vCPU and 2GB RAM, and cannot be downsized or upscaled.

Public DDN

  • Fixed CPU: 1 vCPU
  • Fixed RAM: 2GB
  • CPU and memory cannot be customized for Hasura-provided connectors.
  • The limit and request are always set to the same value.

Private DDN

  • Default CPU: 1 vCPU
  • Default RAM: 2GB
  • The defaults, minimum, and maximum allowed values can be configured per data plane.

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.