Book Image

Node.js High Performance

By : Diogo Resende
Book Image

Node.js High Performance

By: Diogo Resende

Overview of this book

Table of Contents (14 chapters)

Data storage


There are many ways of storing data. It depends on what type of data you have and how big it can become. If you just need to store a simple key/value pair, you can use a file with the format of your choice (for example, an INI or a JSON file). If that key/value pair grows to thousands or millions, you probably won't want to keep it there. You need to think about your data and choose the best possible storage for it, at least from your viewpoint.

If you have other applications, you might try to choose the same data storage to all or some of those applications. This is actually not a bad decision. Choosing the second best tool and trying to use just one or two tools for a couple of applications greatly improves your chances of gaining knowledge about that subset, instead of using the best tool for every application and ending up with many tools and little knowledge about each one.

Excessive I/O

When using a custom solution, we need to carefully plan how we store and access our data...