operationcode_infra icon indicating copy to clipboard operation
operationcode_infra copied to clipboard

Set resource limits for all applications

Open hollomancer opened this issue 8 years ago • 5 comments

Kubernetes doesn't know how to size them to put them on nodes, so it doesn't know how to scale up. Along with that, when k8s scales down, applications should know how to gracefully shut themselves down so requests aren't dropped

hollomancer avatar Oct 16 '17 02:10 hollomancer

Each Deployment manifest we create should have a resource block specifying at least requests, like so:

resources:
  requests:
    cpu: 100m
    mem: 128Mi

These include:

  • operationcode_backend
  • operationcode_frontend
  • operationcode_bot (currently defunct)
  • town_crier

With docs here

ohaiwalt avatar Oct 29 '17 01:10 ohaiwalt

Actual resource usage on a Sunday afternoon

operationcode-backend-3485932704-9kt5d           2m           435Mi
town-crier-1047233007-fgtxl                      0m           49Mi
operationcode-frontend-1058172611-4jhx2          0m           52Mi
operationcode-psql-postgresql-2918048348-8q0rk   4m           54Mi
operationcode-backend-3485932704-84vnn           2m           421Mi
operationcode-bot-1758919366-rvlww               0m           52Mi
operationcode-frontend-1058172611-75gf5          0m           65Mi
operationcode-bot-1758919366-qjsp9               0m           54Mi
cloudwatch-l44t7                                 7m           5Mi
operationcode-redis-redis-1146509343-dr3j9       3m           12Mi

ohaiwalt avatar Oct 29 '17 17:10 ohaiwalt

Let's do this post-migration.

nellshamrell avatar Dec 12 '17 02:12 nellshamrell

What limits do we want to impose? ie 128Mi for memory and 0.1 for cpu

steaksauce- avatar Oct 17 '18 17:10 steaksauce-

I added some very generic resource limits to everything (with 2 different PRs, since one PR affects the location of some of the deployments).

steaksauce- avatar Oct 05 '19 02:10 steaksauce-