Skip to content

feat: Introduce Horizontal Pod Autoscaler, offload blocking evaluatio…#269

Merged
IsmailMehdi merged 18 commits intomainfrom
scaling
Mar 18, 2026
Merged

feat: Introduce Horizontal Pod Autoscaler, offload blocking evaluatio…#269
IsmailMehdi merged 18 commits intomainfrom
scaling

Conversation

@IsmailMehdi
Copy link
Copy Markdown
Collaborator

This pull request introduces infrastructure and code enhancements to support horizontal scaling, improve concurrency, and increase the robustness of session management within the evalbench service.

Key Changes
Scalability & Orchestration

Horizontal Pod Autoscaler (HPA): Added a new hpa.yaml configuration to automatically scale the evaluation server based on CPU utilization (target 50%).

Resource Management: Defined explicit CPU and memory requests and limits for the evalbench-eval container to ensure predictable scaling behavior.

Makefile Updates: Updated the deploy target to include the HPA configuration during deployment.

Performance & Concurrency

Async Offloading: Modified eval_service.py to offload blocking operations, such as evaluator.evaluate and _process_results, to a thread pool executor. This prevents the gRPC event loop from blocking during intensive evaluation tasks.

Container Optimization: Updated the Dockerfile to streamline supervisord configuration and set a fixed BUILD_TIME environment variable.

Session Management Robustness

Safe Lookups: Updated sessionmgr.py to use .get() for session lookups and added existence checks before deletion to prevent KeyError exceptions.

Improved Reaper Logic: Refactored the session reaper to be more efficient, using list comprehensions for identifying expired sessions and increasing the sleep interval to 10 seconds to reduce overhead.

…n tasks to a thread pool, and enhance session manager robustness.
@IsmailMehdi IsmailMehdi requested a review from mahyareb as a code owner March 17, 2026 18:17
@IsmailMehdi
Copy link
Copy Markdown
Collaborator Author

/gcbrun

1 similar comment
@IsmailMehdi
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@IsmailMehdi IsmailMehdi requested a review from totoleon March 17, 2026 18:43
…include additional metadata for sdist and wheel URLs.
@IsmailMehdi
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@IsmailMehdi
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@IsmailMehdi
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@IsmailMehdi IsmailMehdi merged commit a639282 into main Mar 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants