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

Posted April 5, 2018 2.8k views
Node.jsDigitalOceanUbuntu 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

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.

Submit an Answer
2 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