3 ms·
Hmm... interesting. I wonder how you define a "tenant" and how tenant affinity is applied to a connection (routing). I doubt you're talking about process-per-we
by old-gregg 11y ago
Hmm... interesting. I wonder how you define a "tenant" and how tenant affinity is applied to a connection (routing). I doubt you're talking about process-per-web-request, in that case a good ole CGI would do.
Shoot me an email to ev@kontsevoy.com, will be glad to chat more about this.
- icebraining 11y agoNot process-per-web-request, but a process-per-account. We route using DNS, by giving each accounts its own subdomain. Essentially, think something like WPEngine, except for a different software.
- old-gregg 11y ago1st idea that comes to mind: 1. Package your per-tenant application into a Kubernetes pod (think of it as a lightweight VM, a collection of Docker containers running on a same host). 2. Write a request router: someone needs to look up tenants based on the virtual hostname in a request. 3. Use k8s API to find a pod with label == tenant. If doesn't exist -> create one. 4. Forward the request there. I'd imagine you'll have to "garbage collect" and gracefully shutdown pods when they sit idle for a while. I'd probably pack that logic into a pod itself.
- icebraining 11y agoI have to thank you; I had seen the Pods concept, but didn't look deeply, since it sounded like they only managed the application itself, while I also need to manage data (primarily client databases) within the pods. But now I see that Pods support some really interesting data volume management systems that could support moving it around if we need to migrate Pods between hosts. Thanks!