Skip to content

Kubernetes Deployment (General Discussion)Β #379

@ZuSe

Description

@ZuSe

Hi folks,

the official docs do provide an good example how to deploy daphne to a BM or VPS, using the combination of supervisor + nginx. However, I personally would consider this to be to heavy for a typical kubernetes deployment, especially considering the fact that many clusters ship with very convenient LB / Ingress support.

For that reason I would like to start a more general discussion on how a smart setup for k8s could look like and what experience people made so far. Eventually it should result in a example / best practice guide to be added to the docs.

So open questions from my side would be.

  1. Is it worth adding nginx to the pod if there is already a LB / Ingress in use?
  2. Does it make sense to use supervisor as process manager or shouldn't it be enough to let k8s manage the lifetime of the pods?
  3. Is there any major problem letting daphne directly manage the HTTP & WS traffic?

Just to share our experience.
For now we are spawning one single daphne process per pod, serving up to 250 rq/s without any major performance issues.
However I am not sure if for larger scale scenarios multiple processes would be beneficial. According to OVH most k8s-nodes are quad-core or higher, i think it's similar on other providers.

Happy to discuss

Best
Patrick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions