I have a need to implement a number of microservices that will provide validation and lookup services. Each will hold independent and (essentially) read-only reference data. In each case, the data would easily fit in a relational db. Given the size of the data, SQL Server would probably end up caching the blocks in memory. The data situation is:

  • little or no growth
  • infrequent updates
  • few (or no) joins required
  • small databases
  • hundreds or thousands of rows

But I need very fast access.

Communications between microservices will be via web calls exchanging JSON.

Given this, is there any performance advantage in using a NOSQL db, like Mongo, in this case?

SQL Server would be easier, but is happy to go Mongo if there is a reason. If 95% of the cost of the call is the call overhead and 5% is the actual data retrieval, then the DB tech probably does not make much difference.

More details:

The application we are building is based on a microservices architecture with (ultimately) 10s or 100s of services. The core data component will be significant (detailed information on 100,000s of members). It will be hosted primarily on SQL Server on Windows servers. Given the isolation level between services, each can use the most appropriate technology.

This question specifically relates to the reference data part of things.

1 Answer 1


Given the size of the data and the frequency of updates, I would consider the choice of the database irrelevant: in order to get very fast access, you'll use caching anyway, which, from your description of the context, wouldn't be difficult to implement for all the data.

The major considerations would be:

  • The structure of the data. Is it better represented as a bunch of tables or rather documents?

  • The complexity of the data. If the data is simple enough, wouldn't Redis be another alternative? What about a flat file?

  • Reliability: although both SQL Server and MongoDB make it possible to replicate data on multiple servers, make sure you have enough expertise to set up and configure the environment.

  • Your purely subjective preferences. Microsoft? Oracle? Open source? Licensing is another important factor. In production, SQL Server—even its free variant—is usually hosted on Windows Server, which could quickly become too expensive for a small project.

  • I've added some more details to the question. You are correct about Redis, it does feel a better match.
    – dave
    Commented Sep 17, 2015 at 1:10
  • 1
    For me it's also important to consider the complexities associated with adding a new technology such as Redis or MongoDB. If the majority of your data is already stored in SQL Server you should look for a very compelling reason to add something new prior to doing so.
    – joekrell
    Commented Sep 17, 2015 at 2:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.