2022-08-29
2359
#node
Geshan Manandhar
58619
Aug 29, 2022 ⋅ 8 min read

Optimizing your Node.js app’s performance with clustering

Geshan Manandhar Geshan is a seasoned software engineer with more than a decade of software engineering experience. He has a keen interest in REST architecture, microservices, and cloud computing. He also blogs at geshan.com.np.

Recent posts:

Comparing Mutative Vs Immer Vs Reducers For Data Handling In React

Comparing React state tools: Mutative vs. Immer vs. reducers

Mutative processes data with better performance than both Immer and native reducers. Let’s compare these data handling options in React.

Rashedul Alam
Apr 26, 2024 ⋅ 7 min read
Radix Ui Adoption Guide Overview Examples And Alternatives

Radix UI adoption guide: Overview, examples, and alternatives

Radix UI is quickly rising in popularity and has become an excellent go-to solution for building modern design systems and websites.

Nefe Emadamerho-Atori
Apr 25, 2024 ⋅ 11 min read
Understanding The Css Revert Layer Keyword, Part Of Css Cascade Layers

Understanding the CSS revert-layer keyword

In this article, we’ll explore CSS cascade layers — and, specifically, the revert-layer keyword — to help you refine your styling strategy.

Chimezie Innocent
Apr 24, 2024 ⋅ 6 min read
Exploring Nushell, A Rust Powered, Cross Platform Shell

Exploring Nushell, a Rust-powered, cross-platform shell

Nushell is a modern, performant, extensible shell built with Rust. Explore its pros, cons, and how to install and get started with it.

Oduah Chigozie
Apr 23, 2024 ⋅ 6 min read
View all posts

5 Replies to "Optimizing your Node.js app’s performance with clustering"

  1. This is a really good article. I didn’t know that pm2 had cluster mode and it actually means LBing. Thank you very much.

  2. How do you create clustering to multiple EC2 instances?
    I’m looking on to run a cluster of EC2 instance with NodeJS clustering talking to a MySQL database in Master + RR

    Thanks for your thoughts in advance!

    1. Hey Ashley,

      Clustering EC2 instances will be more like load balancing and that would need the application to be stateless.

      Rather than that possibly look at AWS Fargate (or Google cloud run). Another way of doing it might be a full on Kubernetes (EKS) but that might be too much depending on the use-case. It might be easier to try out AWS Lambda and scale up to Fargate/ECS than dabble with EC2 VMs.

Leave a Reply