Open Closed

[Studio] Auth-Server-recommended-CPU-and-RAM-requirements #7815


User avatar
0
christian@laekkerai.com created
  • ABP Framework version: v7.3.3
  • UI Type: Angular
  • Database System: EF Core & MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace: -
  • Steps to reproduce the issue:

Question: What are the recommended CPU and RAM requirements to run the auth server smoothly in a Kubernetes cluster? Right now, it is a bottleneck in our microservice environment because all services verify the tokens through it. At times, it delays requests made to our microservices by up to 30 seconds because they wait for the auth server to respond. We tested it with a fresh install having just one tenant with a single user.

So what are the recommended CPU and RAM requirements?


5 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    I don't think this problem is caused by insufficient system resources. Can you send me your log records to determine the problem correctly? Most likely your Redis server is either down or not accessible. See more: https://stackoverflow.com/a/69371513/9922629

  • User Avatar
    0
    christian@laekkerai.com created

    The redis server is running and accessible. Checked the the auth server pods too.

    I am unable to attach anything else than images here. Logfile can be found at: https://eatatsys-my.sharepoint.com/:u:/g/personal/bielefeldt_aveato_de/ETN48jaPAC1Lg-YfJKJ7kVEBkQS1vewPAb_RXFIvKnhYBQ?e=9l3unK

    We increased the machine size for the auth server. We do not get those 30 second peaks anymore but still i t takes ~4 seconds.

  • User Avatar
    0
    christian@laekkerai.com created

    Any ideas here? Or regarding my original question what are the recommended specs for a server so that the auth server responds withing 50ms-75ms for token validation and logins.

  • User Avatar
    0
    ahmetfarukulu created

    Any ideas here? Or regarding my original question what are the recommended specs for a server so that the auth server responds withing 50ms-75ms for token validation and logins.

    Hi @christian,

    If a microservice responds slowly to each request, the issue might be different from the authentication server's token validation process. This is because, on the first request to the microservice, it retrieves the public key from the authentication server's JWKS endpoint. After that, it caches the public key and uses it for subsequent requests. However, if the problem occurs intermittently and you are sure it's related to the authentication app, you can perform some performance tests with k6 or other tools. I am adding my test result to the report for further analysis and review.

    When I send a request to the authentication server JWKS endpoint with a CPU limit of 500m (3GHz base speed) and a memory limit of 512Mi.

    50 concurrent users with a total of 500 requests, and it responded in approximately 65 ms after the warm-up period.

  • User Avatar
    0
    ahmetfarukulu created

    Similarly, for the login process performance test, retrieving a token from the /connect/token endpoint with 5 concurrent users and 25 requests took approximately 750-1000 ms.

Made with ❤️ on ABP v9.1.0-preview. Updated on October 11, 2024, 07:13