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

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

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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?