Authentication Service Latency
Users are reporting intermittent slow login times, sometimes leading to timeouts. Investigate the authentication service and its dependencies to find the root cause of the latency.

System Overview

The system consists of a public-facing API Gateway, an Authentication Service, a User Database, and a Caching Service. The Auth Service is responsible for verifying user credentials against the User Database and generating session tokens. The Caching service is used to cache session tokens.

Logs

[2023-10-27 10:00:01] INFO: Request received for /login
[2023-10-27 10:00:01] INFO: Forwarding request to auth-service
[2023-10-27 10:00:08] ERROR: Upstream service request timed out after 7000ms for /login
[2023-10-27 10:01:15] INFO: Request received for /login
[2023-10-27 10:01:15] INFO: Forwarding request to auth-service
[2023-10-27 10:01:16] INFO: Request successful for /login
[2023-10-27 10:02:30] INFO: Request received for /status - successful
Diagnosis & Plan
Based on the logs, what do you think the root cause is, and what are your proposed next steps?