<@U04S8PLJWMT> any guidance on resources limits an...
# ask-ai
d
@kapa.ai any guidance on resources limits and requests k8s deployment wide?
k
For Kubernetes-wide resource limits and requests in an Airbyte deployment, the official guidance is as follows: - Start with a mid-sized cloud instance (e.g., 4 or 8 cores) and tune the instance size based on your workload. - The main resources to consider are memory and disk space. Memory is especially important for sync jobs, as the source worker can read up to 10,000 records in memory, which can require significant RAM for large row sizes (e.g., 5GB RAM for 0.5MB average row size). - Disk space: Allocate a minimum of 30GB per node, but err on the side of over-provisioning since storage is relatively inexpensive. This accounts for logs and connector images, which can add up if you have many connectors deployed. - On Kubernetes, ensure your cluster can schedule up to
2 x <number-of-possible-concurrent-connections>
pods at once, as each sync job uses two workers (source and destination) and this is a good rule of thumb for worst-case pod scheduling needs. Instance-wide resource requirements can be set in your
values.yaml
file using the following environment variables:
Copy code
yaml JOB_MAIN_CONTAINER_CPU_REQUEST:    # Minimum CPU usage JOB_MAIN_CONTAINER_CPU_LIMIT:      # Maximum CPU usage JOB_MAIN_CONTAINER_MEMORY_REQUEST: # Minimum RAM usage JOB_MAIN_CONTAINER_MEMORY_LIMIT:   # Maximum RAM usage
These settings apply to all job containers unless overridden by more specific configurations (connector definition, connector-specific, or connection-specific). It's recommended to start with Airbyte's defaults and only increase resource allocations for connectors or connections that require it, based on observability and monitoring data. Best practices: - Use monitoring tools to track requested vs. used CPU and memory. - If high requested resources are blocking pod scheduling but actual usage is low, consider lowering the defaults. - If you experience "stuck jobs" or failures due to unavailable pods, increase the job CPU and memory limits or scale up your cluster. For more granular control, you can override resources at the connector or connection level using SQL updates to the Airbyte database, but for deployment-wide settings, the above environment variables in
values.yaml
are the primary method. References: - [Scaling Airbyte](https://docs.airbyte.com/platform/1.7/operator-guides/scaling-airbyte#what-to-scale) - [Configuring Connector Resources](https://docs.airbyte.com/platform/1.7/operator-guides/configuring-connector-resources)
d
@kapa.ai I have 2 cpu 4 ram instances, should I use a larger one?
k
A message from kapa.ai
Based on the official Airbyte documentation, it is recommended to use instances with at least 2 cores and 8 GB of RAM for production deployments of Airbyte Self-Managed Enterprise. Your current instances (2 CPU, 4 GB RAM) are below this recommended minimum. Using instances with only 4 GB of RAM may lead to performance issues, especially as sync jobs can be memory-intensive—source workers can require several gigabytes of RAM depending on your data size and connector configuration. Recommendation: You should use larger instances, ideally with at least 2 CPU cores and 8 GB of RAM, to ensure stable and reliable Airbyte operation in production environments. For even better performance and scalability, consider memory-optimized instance types (such as AWS M7i/M7g) as suggested in the documentation [Infrastructure Prerequisites](https://docs.airbyte.com/platform/enterprise-setup/implementation-guide#infrastructure-prerequisites). > “We recommend running Airbyte on instances with at least 2 cores and 8 gigabytes of RAM.” > — [Enterprise Implementation Guide](https://docs.airbyte.com/platform/enterprise-setup/implementation-guide#infrastructure-prerequisites) If you are running into performance issues or plan to scale up your workloads, moving to larger instances is strongly advised.
d
I see that all airbyte pods are limitless @kapa.ai
Copy code
airbyte       airbyte-v2-bootloader                                  <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-connector-builder-server-7754f748c5-nrmc5   <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-cron-74594789b6-qg9n9                       <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-server-7dcf86bf5d-5hfn2                     <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-temporal-688ff47bcf-rhr8h                   <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-worker-86c757d584-2sdpp                     <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-workload-api-server-795dd7596c-jq8hc        <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-workload-launcher-689d57d95f-hjt77          <none>                    <none>    <none>                          <none>
Way to ensure pods are not going over limit?
k
A message from kapa.ai
Sorry @Dmytro Shamenko, I am experiencing especially high traffic right now, please try again. 🧑‍💻
d
I see that all airbyte pods are limitless @kapa.ai
Copy code
airbyte       airbyte-v2-bootloader                                  <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-connector-builder-server-7754f748c5-nrmc5   <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-cron-74594789b6-qg9n9                       <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-server-7dcf86bf5d-5hfn2                     <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-temporal-688ff47bcf-rhr8h                   <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-worker-86c757d584-2sdpp                     <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-workload-api-server-795dd7596c-jq8hc        <none>                    <none>    <none>                          <none>
airbyte       airbyte-v2-workload-launcher-689d57d95f-hjt77          <none>                    <none>    <none>                          <none>
Way to ensure pods are not going over limit?
k
A message from kapa.ai
To ensure Airbyte pods have resource limits and do not run without constraints, you need to explicitly set resource requests and limits in your deployment configuration. By default, if you do not specify these values in your
values.yaml
or environment variables, the pods will be created without any CPU or memory limits, as you observed. How to set resource limits for Airbyte pods: 1. Set instance-wide resource requirements in your
values.yaml
file for job containers (sync, check, discover, spec jobs):
Copy code
yaml    global:      jobs:        resources:          limits:            cpu: 500m        # Example value            memory: 1Gi      # Example value          requests:            cpu: 250m        # Example value            memory: 512Mi    # Example value
Or, for more granular control, set the following environment variables:
Copy code
yaml    global:      env_vars:        JOB_MAIN_CONTAINER_CPU_REQUEST: "250m"        JOB_MAIN_CONTAINER_CPU_LIMIT: "500m"        JOB_MAIN_CONTAINER_MEMORY_REQUEST: "512Mi"        JOB_MAIN_CONTAINER_MEMORY_LIMIT: "1Gi"        # Repeat for CHECK, DISCOVER, SPEC jobs if needed
This will ensure that all job pods (including orchestrator, read, write, check, discover, spec) have the specified resource requests and limits applied [Configuring Connector Resources](https://docs.airbyte.com/platform/next/operator-guides/configuring-connector-resources). 2. For core Airbyte services (like server, worker, temporal, etc.), you should also set resource requests and limits in the
values.yaml
under each component if supported by your Helm chart version. For example:
Copy code
yaml    server:      resources:        limits:          cpu: 500m          memory: 1Gi        requests:          cpu: 250m          memory: 512Mi
Repeat this for other components as needed. 3. Apply your changes by upgrading your Helm release:
Copy code
sh    helm upgrade <release-name> airbyte/airbyte -f values.yaml
Note: If you do not set these values, Kubernetes will not enforce any resource limits, and pods can consume as much CPU and memory as available on the node, potentially impacting cluster stability [Scaling Airbyte](https://docs.airbyte.com/platform/operator-guides/scaling-airbyte#what-to-scale). Summary: Explicitly define resource requests and limits in your
values.yaml
or as environment variables to ensure Airbyte pods do not run without limits. This is the recommended and supported way to control pod resource usage in Airbyte on Kubernetes.