Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple Celery and Redis from backend into separate Cloud.gov services #3336

Open
16 tasks
jtimpe opened this issue Dec 4, 2024 · 0 comments
Open
16 tasks
Labels
dev Refined Ticket has been refined at the backlog refinement

Comments

@jtimpe
Copy link

jtimpe commented Dec 4, 2024

Background

Currently, Celery workers and Redis are deployed within the same application as the backend. Decoupling Celery workers into their own application, and Redis into a separate managed service, will help optimize resource usage on the backend server. It will also allow each of these services (Celery, Redis, and the backend) to be independently scalable.

Acceptance Criteria

  • Celery is deployed as its own application in cloud.gov
  • Redis is deployed as a managed service in cloud.gov, bound to both backend and celery
    • Only one redis per environment (dev, staging, prod) is deployed. Use channel filters to separate traffic from different apps (where applicable)
  • Modifications to infrastructure or the applications are deployed via circle ci
  • Testing Checklist has been run and all tests pass
  • README is updated, if necessary

Tasks

  • Deploy redis as a managed service
    • Remove redis from application dependencies in apt.yml
    • Remove redis startup from gunicorn_start.py
    • Remove REDIS_URI env var from manifest.buildpack.yml
    • Deploy managed redis in cloud.gov, bind the service to celery and backend in deploy-backend.sh
  • Deploy celery as a separate application
    • Copy manifest.buildpack.yml to manifest.celery.yml (or similar)
    • Update the command in the new manifest to start celery instead (copy/remove the celery start lines from gunicorn_start.py)
    • Copy/abstract the logic in deploy-backend.sh to also deploy the new celery manifest. The environment variable logic needs to be the same for both celery/backend, and celery must be bound to the same services as backend.
  • Run Testing Checklist and confirm all tests pass
@jtimpe jtimpe added the dev label Dec 4, 2024
@lhuxraft lhuxraft added Refined Ticket has been refined at the backlog refinement P2 Needed – Can wait indefinitely labels Dec 10, 2024
@lhuxraft lhuxraft changed the title Separate Celery and Redis Decouple Celery and Redis from backend into separate Cloud.gov services Dec 12, 2024
@lhuxraft lhuxraft removed the P2 Needed – Can wait indefinitely label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Refined Ticket has been refined at the backlog refinement
Projects
None yet
Development

No branches or pull requests

2 participants