My Multiplayer Game is Slow over digitalocean Host how can i make it fast ?

April 5, 2018 218 views
Node.js DigitalOcean Ubuntu 16.04

I've create a server with nodeJs to use it in my online game ,

***** the server works very good and the game is fast with no lagging on my localHost / when i hosted it on my computer .

*****and it's very slow when host it in digitalocean i'm useing the lowest package in oceandigital

please help me to fix this lag

3 Answers

Thanks for sharing your question. To best help you with this we'll need a bit more information..

  • Can you clarify "slow" in this context? Are you seeing slow data transfer speeds between your client and server, slow time to first response or high ping times?

  • What type of communication is used between client and server UDP/TCP? http?

  • Is your node.js app having to do database queries? If so, what steps have you taken to optimize your database configuration?

  • Is your node.js app running standalone or through a proxy like nginx?

Thanks for quick response ,

1st i want to highlight that when i use my nodeJs server in my local computer the game runs without any lag ,
thats why i think the problem is from digitalocien host

now answering your queries ,

1-the message between server and clients are slow
2-TCP / but agian the server and game work very good when i use my local host
3-no database just node file .js and no database directly from the clients to the server
4-i didnt use any proxy

i was thinking if there is a special service for realtime game host if you any thing about that please let me know

  • also does the port number affect the service or the speed ?

  • Keep in mind that response time for your game running local to in production will differ. Perhaps the droplet needs a bit different configuration, more power, use a CPU optimized droplet, or perhaps design your app and hosting infrastructure to distribute the workload across multiple droplets.

Have another answer? Share your knowledge.