6 Dec 2023 |
@iuselinux:matrix.org | I'm having a system design problem. If I deployed a cluster in Kubernetes where every node is running the same stateless code and these nodes are connecting to a managed mongodb cluster on digital ocean with same connection string. How will the node balancing happen? is it automatic or needs to be configured? | 14:06:48 |
@tauoverpi:tchncs.de | off topic: do you really need microservices here? | 14:30:21 |
@iuselinux:matrix.org | Nope, are you asking me because I mentioned kubernetes? | 14:32:47 |
@iuselinux:matrix.org | I'll be going with kubernetes because of cost considerations in digital ocean | 14:33:29 |
@tauoverpi:tchncs.de | ah, alright | 14:56:57 |
@dsg:tchncs.de | In reply to @iuselinux:matrix.org I'm having a system design problem. If I deployed a cluster in Kubernetes where every node is running the same stateless code and these nodes are connecting to a managed mongodb cluster on digital ocean with same connection string. How will the node balancing happen? is it automatic or needs to be configured? depends on how you configure your cluster ingress | 15:36:22 |
@dsg:tchncs.de | if you are talking about the load balancing in kubernetes between nodes | 15:36:56 |
7 Dec 2023 |
@iuselinux:matrix.org | I'm talking about load balancing in managed mongodb service provided by digital ocean, The stateless nodes from kubernetes will be connecting and requesting data to mongodb service through the same connection string, are these requests load balanced in mongodb automatically? | 08:07:27 |
@tauoverpi:tchncs.de | sounds like there's more information needed here | 08:44:10 |
@dsg:tchncs.de | In reply to @iuselinux:matrix.org I'm talking about load balancing in managed mongodb service provided by digital ocean, The stateless nodes from kubernetes will be connecting and requesting data to mongodb service through the same connection string, are these requests load balanced in mongodb automatically? no idea, as that's a managed DO thing I think you should consult hem | 08:58:52 |
@dsg:tchncs.de | In reply to @iuselinux:matrix.org I'm talking about load balancing in managed mongodb service provided by digital ocean, The stateless nodes from kubernetes will be connecting and requesting data to mongodb service through the same connection string, are these requests load balanced in mongodb automatically? * no idea, as that's a managed DO thing I think you should consult with them | 08:59:01 |
@iuselinux:matrix.org | I'm building an ERP system for universities as my masters project using MEAN stack. but before that I'm building the design/architecture of the ERP system, I've considered other options like app platform (paas service by digital ocean) but due to cost considerations, out of all deployment solutions, I'm going to use Kubernetes service by Digital Ocean and I'll be keeping the database outside the Kubernetes by using managed mongodb service on same platform i.e. digital ocean
Due to limitations on managed mongodb like a single digital ocean account can have at the most 10 mongodb clusters running, I can't use single tenant architecture for ERP system so, I'll be using a multi tenant architecture. I can use virtual machines (called droplets in Digital ocean) and go with single tenant architecture that way the code becomes easy but downside is a lot of manual management of virtual machines. so using multi tenant architecture is final, the resources of customer universities will be logically separated but not physically.
again, the architecture is - nodes in Kubernetes running the same stateless code and mongodb will be outside the cluster using managed mongodb service of digital ocean
my question is: HOW THIS SYSTEM WILL SCALE and HOW THE LOAD BALANCING WILL HAPPEN?
there is a separate product called load balancer in digital ocean, do I even need it in this setup?
| 09:11:09 |
@dsg:tchncs.de | I'm not sure what you mean by load balancing for a database - do you want to have replicas, partitions or what? | 09:24:54 |
@dsg:tchncs.de | besides, as it's a "managed" solution do consult with the provider documentation/support regarding what eactly they provide | 09:26:04 |
@dsg:tchncs.de | * besides, as it's a "managed" solution do consult with the provider documentation/support regarding what exactly they provide | 09:26:08 |
@iuselinux:matrix.org | In reply to @dsg:tchncs.de I'm not sure what you mean by load balancing for a database - do you want to have replicas, partitions or what? nothing is mentioned about sharding in digital ocean documents | 09:27:24 |
@dsg:tchncs.de | also, why not consider a separate DB per each tenant :) | 09:27:32 |
Spectre | Sup everybody | 09:27:50 |
@iuselinux:matrix.org | In reply to @dsg:tchncs.de also, why not consider a separate DB per each tenant :) as I explained, there's limitation on maximum amount of clusters I can have for a single digital ocean account, I can have at the most 10 mongodb databases per account | 09:28:48 |
@iuselinux:matrix.org | In reply to @nosspectre:matrix.org Sup everybody hello :D | 09:28:56 |
Spectre | Hi! How's it going? | 09:29:22 |
Spectre | Forgot to mute the notifications of my client so I kept hearing "ding ding ding ding" all night lol | 09:29:58 |
@iuselinux:matrix.org | In reply to @dsg:tchncs.de I'm not sure what you mean by load balancing for a database - do you want to have replicas, partitions or what? nodejs backend code uses mongodb connection string, right? won't the database get overwhelmed by all the requests that Kubernetes cluster nodes will be doing to the database | 09:30:15 |
@iuselinux:matrix.org | In reply to @nosspectre:matrix.org Hi! How's it going? currently stuck on a system design problem | 09:30:50 |
Spectre | Rip | 09:31:16 |
Spectre | Which distro? | 09:31:21 |
@iuselinux:matrix.org | what the distro has to do about system design? | 09:31:49 |
@iuselinux:matrix.org | linux mint | 09:31:52 |
Spectre | Nvm I misunderstood desktop environment with system design sorry | 09:32:20 |
@iuselinux:matrix.org | ok | 09:32:26 |