Best Practices for Production setup of Nodejs Application: Part I

Ensuring performance and reliability are critical aspects when deploying applications in a production environment. Optimizing performance involves efficient resource utilization, minimizing response times, and handling high user loads effectively. Reliability entails robust error handling, graceful failure recovery, and implementing fault-tolerant measures to ensure uninterrupted operation.

Health Checks and Graceful Shutdown of Expressjs App using Lightship

Expressjs is a fast, unopinionated, minimalist web framework for Node.js. Few functionalities like graceful shutdown, health checks etc are implicitly mandatory features for any production application. When you deploy a new version of your application, you must replace the previous version.

Mongodb Capped Collections - An Overview

Capped collections provide fixed-size collections that enable high-throughput operations for inserting and retrieving documents based on their insertion order. They function similarly to circular buffers, where once a collection reaches its allocated space, new documents overwrite the oldest ones in the collection.

Mongodb Views: A Secure Way to Access & Share Data

Data access and sharing data across teams or third parties are a very common phenomenon. Sharing sensitive data is a strict no. However, why even share data which is irrelevant for the data consumer.

Mongoose Discriminator: The non DRY way to inherit schema properties

Mongoose Discriminator is another very useful and powerful yet underused feature of Mongoose. It serves as a means of schema inheritance, allowing you to use multiple models with intersecting schemas on the same underlying MongoDB collection.