Nodejs
Best Practices for Production setup of Nodejs Application: Part I
Nodejs

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. By prioritizing both performance and reliability, organizations can deliver a seamless user experience and maintain the stability of their deployed applications.

Nodejs
Health Checks and Graceful Shutdown of Expressjs App using Lightship
Nodejs

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. Previous version app should stop accepting new requests, finish all the ongoing requests, clean up the resources it used, including database connections and file locks then exit. Similarly, health checks are needed to determine if an application instance is healthy and can accept requests.

Mongodb
Mongodb Capped Collections - An Overview
Mongodb

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
MongoDB Views: A Guide to Secure Data Access and Sharing
Mongodb

In today’s data-driven ecosystem, organizations face a significant challenge: balancing the imperative for data accessibility with stringent security requirements. Data access and sharing data across teams or third parties are a very common phenomenon. One of the most common scenarios database administrators and architects encounter is the need to share collection data with various stakeholders—internal teams, partners, or third-party services—without compromising sensitive information. However, why even share data which is irrelevant for the data consumer. Suppose a MongoDB collection contain sensitive information. To restrict the access to collection, MongoDB offers Role-Based Access Control (RBAC).

Mongodb
Mongoose Discriminator: The non DRY way to inherit schema properties
Mongodb

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. You can store different entities in one collection, and you will still be able to discriminate between these entities. Unfortunately, the documentation of this feature is poor.