New to this so thanks for your patience. I have a node.js app which hosts a game session for 8 people. My goal is to scale this to support multiple sessions simultaneously with potentially hundreds of users.
I won’t have a server browser, it will be a quick join button and the matchmaking server will spin up an instance of the game session and shut it down on conclusion.
Initially, I was intending to have multiple droplets on standby but this is a very manual approach. I understand I should be using the PaaS functionality instead.
Is anyone willing to share some insight into how this could/should be implemented?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya @b264bb99b587e029a438cb3eb9e7ba,
There are various ways to implement this kind of scalability. I’ll try to give you a few examples of how you might want to achieve this and you’ll need to dig deeper into the one you decide.
We can help once you decide as well with some configuration or tutorials.
Containers and Orchestration:
Containerization (with tools like Docker) can help package your application with its dependencies, which simplifies deployment and scaling. Kubernetes is a popular open-source system for automating deployment, scaling, and management of containerized applications. It can handle the creation and destruction of game instances as demand increases or decreases.
Managed Kubernetes Services:
Managing a Kubernetes cluster on your own can be complex. DigitalOcean provides managed Kubernetes services that handle the heavy lifting of maintaining the underlying infrastructure. https://www.digitalocean.com/products/kubernetes
Serverless Architecture:
If you want to abstract away even more infrastructure management, consider serverless options like the DigitalOcean one. These services let you run your code without provisioning or managing servers. They automatically scale your application by adjusting its capacity in response to incoming requests. https://www.digitalocean.com/products/functions
Database Scaling:
If your application has a back-end database, you’ll need to consider how it scales as well. Managed database services can help here.
https://www.digitalocean.com/products/managed-databases
Load Balancing:
Consider how you’ll distribute incoming game session requests across your instances. Load balancers can help distribute traffic to ensure no single instance is overwhelmed.
Keep in mind that all these solutions might require you to adjust your application architecture.