Context There is a library that is used by all the services that is causing high memory usage and it involves redis (redis was included in the name of the library). The list of the services that were affected. Below is the dashboard that was linked to the ticket: Services were running on Kubernetes and… Continue reading Tracking down high memory usage in Node.js
Tag: javascript
Built-in WebSockets in Node.js
WebSockets are essential for building real-time applications, enabling two-way communication between a client and a server. Whether you’re working on a chat app, stock market ticker, or a collaborative tool, WebSockets allow your server and client to stay connected and send data in real-time. As of 2024, Node.js continues to make it easier to work with WebSockets, especially with the… Continue reading Built-in WebSockets in Node.js
Intro to Node’s built-in SQLite module
SQLite in Node makes it easier than ever to persist data with server-side JavaScript. Get started with the node:sqlite module. Credit: iStock Node 22.5.0 now bundles SQLite, a lightweight, in-process relational database that requires no additional infrastructure but packs considerable capability. Let’s get to know this handy new built-in feature in Node.js. What is SQLite? Relational databases are a… Continue reading Intro to Node’s built-in SQLite module
Node.js performance hooks and measurement APIs
You’ve written and deployed your application and gathered users – congrats! But what’s next? Improvements, getting rid of bottlenecks, increasing execution speed, and more enhancements are in line. In order to make these improvements, you first have to be aware of your app’s existing performance characteristics. Only when you’ve identified the slow parts and the… Continue reading Node.js performance hooks and measurement APIs
OOPS in JS – Ultimate
▶️ Intro ⭐ What is OOPs ? Object-oriented programming is an approach to solving problems by creating objects . ⭐ 4 Pillars of OOP Terminologies in OOP Abstraction – Hiding internal details (show only essential info!) Encapsulation – The act of putting various components together (in a capsule) Inheritance – The act of deriving new things from existing… Continue reading OOPS in JS – Ultimate
How to Use express-rate-limiter to Limit User Rates in Node.js
In modern web applications, it is very common to have user authentication and authorization systems. These systems provide user-specific functionality and data, which requires that each user has a certain level of access and control over the resources they own. However, when these resources are accessed in a rapid and repetitive manner, it can lead… Continue reading How to Use express-rate-limiter to Limit User Rates in Node.js
High-Traffic Node.js: Strategies for Success
Node.js is a powerhouse for building high-performance applications, but handling high traffic requires more than just writing JavaScript. As your application grows, so do the challenges — slow response times, server crashes, memory leaks, and scalability bottlenecks. If you’re running an API, a real-time chat application, an e-commerce platform, or a SaaS product with thousands… Continue reading High-Traffic Node.js: Strategies for Success
Node Dependency Injection.
I have (again) an indiscreet question: what do your dependency injections look like in your Node apps? Have you ever taken the time to think about this topic? Are you the kind of dev who simply relies on ECMAScript modules to import and export functions and underlying logic across the whole application? Randomly passing data… Continue reading Node Dependency Injection.
Understanding JavaScript Execution with some Pizza
Welcome back, fellow developers! I’m excited to have you here for the next part of our JavaScript deep-dive series. The previous article explored the fundamental concepts and core features that make JavaScript a powerful language. Don’t worry if you missed it – you can catch up here. I was all set to explore JavaScript code execution.… Continue reading Understanding JavaScript Execution with some Pizza
Callbacks vs Promises vs Async/Await: The Ultimate Guide to Asynchronous Javascript
What are callbacks? A callback is a function passed as an argument to another function, which is then executed later (synchronously or asynchronously). Callbacks are fundamental in JavaScript for handling asynchronous operations, event listeners, and functional programming. Sample codes Basic example function saveOrder(orderId, userMail, callback) { const order = { orderId, userMail } scrib.show(order) callback(userMail);… Continue reading Callbacks vs Promises vs Async/Await: The Ultimate Guide to Asynchronous Javascript