Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6095821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:51:22+00:00 2026-05-23T12:51:22+00:00

I am writing a C# HTTP request server for my web game and I

  • 0

I am writing a C# HTTP request server for my web game and I am using MongoDB for the database. Is it more efficient to still cache whatever I can in the C# application? Or is it faster to just do a request to MongoDB for every thing. I am expecting around a dozen selection queries per minute for each active player, and maybe one or two save/update queries per minute.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:51:22+00:00Added an answer on May 23, 2026 at 12:51 pm

    “dozen selection queries per minute for each active player” doesn’t tell us anything. For that to have any bearing we’d need to know the number of active players, the amount of time each query is taking, the table structure, queries in use (including amount of data returned), statistics on server load, and others such as whether you are using Mongo’s ability to shard the database, etc.

    Regardless, before setting up any type of caching I’d highly suggest you start with profiling the system. You need to know where your bottlenecks are, if any even exist. This isn’t something you just guess at, you need hard and real statistics.

    With that information in hand you can make a determination as to whether you need

    • to make minor fixes to your code
    • implement some type of caching strategy
    • shard the database server across multiple servers
    • rearchitect large swathes of code
    • scale up (buy bigger servers)
    • or even fix internal network issues.

    Point is, don’t start caching stuff in the hopes of getting a performance increase later. Caching is just as likely to increase performance as it is to kill it depending on a huge number of factors.


    One other thing to add here. If you are using a web farm to host your request server then the complexity and hardware costs involved in caching data locally to each independent web server grows drastically.

    Hardware costs go up due to increased memory requirements on your web server(s) when trying to keep the data cached in memory on those machines.

    Complexity increases when trying to keep the cached copies in sync so that they don’t become stale. I would imagine that a game would require information that 100% current. Sites like facebook and others can afford to be a little out of sync. When a game server goes out of sync it could have negative impacts on player usability.

    Assuming you are currently deploying only to a single web server and a single DB server, adding caching capabilities now might cause a huge amount of pain for you in the event you move to multiple web servers and/or multiple db servers.

    Finally, if for some reason you are deploying only to a single machine that hosts both the database and web server then caching is completely ludicrous.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an utility ( http://reg2run.sf.net ) which in case execution without arguments works
I'm writing an automation script with autoit: http://www.autoitscript.com/autoit3/index.shtml . In the process I need
I am writing a little application to download files over http (as, for example,
Say you are writing an application that must implement the HTTP protocol. Protocols are
I'm writing a url rewrite in django that when a person goes to http://mysite.com/urlchecker/http://www.google.com
Writing the code for the user authentication portion of a web site (including account
Writing something like this using the loki library , typedef Functor<void> BitButtonPushHandler; throws a
I have been writting a keyword search script based on this tutorial: http://www.hackosis.com/2007/11/06/howto-simple-search-engine-with-php-and-mysql/ Like
Writing some test scripts in IronPython, I want to verify whether a window is
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.