apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.28k stars 2.49k forks source link

help request: CPU and memory Spikes in APISIX deployed in EKS #11442

Open pavankumar-siripurapu opened 1 month ago

pavankumar-siripurapu commented 1 month ago

Description

Hi,

we have deployed APISIX into our production environment via helm chart apisix/apisix (version : 2.7.0), but we override the apisix version with 3.8.0. Below are the resource limits configured. The autoscaling configuration as min 6 and max 10 pods.

# -- Set pod resource requests & limits
resources:
  limits:
    cpu: 500m
    memory: 2Gi
  requests:
    cpu: 300m
    memory: 2Gi

We have enabled 17 routes out of which 5 routes are based on vars condition something like below. We have one custom plugin that is used to set some variables using os.getenv("PARAMETER_NAME") for all the routes. we use proxy-rewrite as well on all the routes.

    name: route-generic
    id: route-generic
    uri: /*
    vars:
      - - uri
        - '~~'
        - '^\/([a-zA-Z][a-zA-Z])\/([a-zA-Z][a-zA-Z])\/.*'

when we deployed to the prod, the CPU and memory of the pods are increasing tremendously within no time. The usual traffic will be like 3000~4000 requests per minute. And the memory or CPU is not coming down gradually.

image

Kong in our same environment used to handle much more requests with less CPU and memory.

image

We're planning to enable more traffic in upcoming days with more route configurations, with this kind of performance issue , we're hesitant to introduce the new traffic. we require your support in identifying the issue. we're happy to connect based at your available time.

@juzhiyuan and @bzp2010 we need your expertise here.

Environment

juzhiyuan commented 1 month ago

Hi @pavankumar-siripurapu, I have sent an email with a calendly link. We can have a call first and then update here.

hemakumar-ganumukkala commented 1 month ago

Hi @pavankumar-siripurapu, I have sent an email with a calendly link. We can have a call first and then update here.

i have forwarded the email .