An API Server without Caching or Batching
Explore how to build a simple API server using Node.js and LevelUP database to query sales transactions without caching or batching. Understand the system's baseline performance by populating a large dataset and conducting load testing, preparing for optimizations in advanced patterns.
We'll cover the following...
Before we start diving into this new challenge, let’s implement a small demo server that we’ll use as a reference to measure the impact of the various techniques we’re going to implement.
Example
Let’s consider an API server that manages the sales of an e-commerce company. In particular, we want to query our server for the sum of all the transactions of a particular type of merchandise. For this purpose, we’re going to use a LevelUP database through the level npm package. The data model that we’re going to use is a simple list ...