Swasthya Sarathi
A healthcare-companion platform for Swasthya Sarathi
A website and mobile app development project for a multi-service healthcare companion — It helps peo...
Read itNode 22 LTS · NestJS · Fastify
Node is the right answer for live features, streaming and many users at once. It is the wrong answer for CPU-heavy work. We build TypeScript services that know the difference, and we will tell you which one you have.
Last updated
Node.js does one thing extremely well: it keeps a huge number of connections open while doing almost nothing on each of them. That is exactly what a live-tracking feed, a chat tier, an online-status service or a dashboard that pushes updates needs. This is why we use Node for those, and only those. The same single event loop that makes it excellent at I/O makes it weak under heavy computing. One blocking call and every open connection waits. We design around that with firm limits, worker threads and queues, and we set an alarm for event-loop lag in production. If your system is really an order flow with a database at the end, we will tell you that Laravel is the better answer and explain why.
Talk to a backend engineerWebSocket connections open at the same time on a single process, in production, on modest hardware.
Fastify with schema-based serialisation, in front of PostgreSQL with a connection pool that is sized properly.
Our production alarm limit. Past it, someone gets a call — before a customer notices anything.
No loose any types, and no shortcuts merged to make a deadline. Zod checks everything that comes in from outside.
Node is the right tool for a small but important set of problems: systems that keep a great many connections open, systems that pass data around more than they work on it, and systems whose team already writes TypeScript everywhere else. Outside that, we will usually point you to Laravel or Go and be honest about why.
Node handles ten thousand idle WebSocket connections on a single process with ease, because an idle connection costs almost nothing. That is excellent, and it is why we use Node for live features: live tracking, chat, online status, editing together, dashboards that push updates instead of asking again and again.
The same trait is also the weak spot. One JSON parse of a 40 MB payload, one tight loop over a large list, one badly written regex meeting bad input, and the event loop stops. Every one of those ten thousand connections is now waiting on it. We treat CPU-heavy work as a firm line: it goes to a worker thread, a BullMQ job, or a different service entirely. We track event-loop lag as a key production number and set an alarm on it, because by the time users notice, you are already several minutes into a problem.
Express is fine for a service that fits in one engineer's head. For anything a team will look after for years, we use NestJS: modules, dependency injection, decorators, class-validator at the boundary, and a structure so the twelfth developer puts their code where the first one would have. It is shaped like Laravel on purpose. Most Node codebases that go bad go bad because no one enforced a structure, not because they lacked clever ideas.
Where raw speed is the need and the surface is small, we use Fastify instead. It is clearly faster than Express, has schema-based checks and serialisation built in, and does not pretend to be a framework for a large team.
TypeScript in strict mode, no exceptions and no any smuggled in to make a deadline.
Drizzle or Prisma for the data layer so the schema is typed where each query is written, and Zod at every outside
boundary, because a type is a promise made while building and the network does not care about your promises.
Where the client is also TypeScript, tRPC removes the hand-written API contract and the kind
of bug where the frontend and backend disagree about a field name.
Stateless containers behind a load balancer, one process per container, managed by tools rather than joined by hand. Redis for shared state and pub/sub between instances, because the moment there is more than one Node process, state kept in memory is a bug waiting to happen. BullMQ for background jobs with retries, backoff and a dead-letter queue. A clean shutdown that finishes running requests on SIGTERM. OpenTelemetry traces, and event-loop lag on the same dashboard as p95 latency.
| Choose Node.js | Choose something else | |
|---|---|---|
| Real-time: chat, tracking, presence | Yes. This is what the event loop was built for, and it holds tens of thousands of idle connections with ease. | Go, if you need a hundred thousand connections per machine and have the team to run it. |
| Order, payment and inventory logic | Only if your team uses TypeScript everywhere and that simple setup is worth more than what you lose in the framework. | Laravel. The work waits on the database, so Node gives you no speed, and you get Horizon and a Filament admin for free. |
| Image, video or report processing | Never inside the request itself. It must go to a worker thread or a queue, or it pulls the whole service down with it. | A separate worker service — Go, Python or a managed pipeline. Keep the CPU-heavy work out of your socket tier completely. |
| Machine learning or data science | No. The libraries are not there and you will build again, badly, what already exists elsewhere. | Python, as a separate service. Have Node call it through a queue. This is dull and it works. |
| Sharing types with a React front end | Strong. tRPC or shared Zod schemas remove the kind of bug where client and server disagree about a field. | Nothing else matches it here. This is the most overlooked reason to pick Node, and the one teams mention least. |
| Small team, complex admin needs | You will build the admin panel by hand, and it will take longer than you think. Plan for it honestly. | Laravel with Filament. A full back office over your data in days. This is not a close contest. |
Live order and vehicle tracking, online status, chat, editing together. Socket.IO or plain WebSockets with Redis pub/sub across instances.
A backend-for-frontend that gathers a mess of inside services into one clean, typed set of rules the client can easily use.
Kafka or Redis Streams consumers, BullMQ workers, handlers that are safe to repeat, and dead-letter queues with a way to replay that an operator can use.
Type safety from the database schema all the way to the React component, with no hand-written API rules to go out of date.
High-volume data intake pipelines where data is moved and changed rather than heavily computed on, and slowing down under load is planned, not hoped for.
An Express codebase that grew past its structure. We reorganise it into NestJS modules, type it strictly, and add tracking so you can see how it runs.
An idle connection costs a file handle and a little memory. Twelve thousand of them on one process is nothing special.
We set the alarm above 20ms. It is the earliest sign that something is blocking, and it fires long before p95 latency notices.
Worker threads or BullMQ jobs. This is a firm line in our Node codebases, checked in every code review.
Strict TypeScript with Drizzle or Prisma, and Zod at every outside boundary. A type is a promise; the network has not read it.
The moment there is a second Node process, state kept in memory is a bug waiting to happen. We do not keep any.
SIGTERM finishes running requests and closes sockets cleanly. Putting a new version live should not be a small outage you have learned to ignore.
A fleet, ePOD and route-planning platform that works offline first, for drivers on roads with poor signal. The two ready...
A Shopify store for a Surat ethnic-wear label. It has 200+ SKUs of lehengas, sarees and suits, sorted by type, colour, f...
A Shopify storefront for a Surat watch and eyewear retailer — where shoppers can browse by gender, brand, style and comb...
Tell us what the system really does and we will tell you honestly if Node is the tool for it. Sometimes the answer is Laravel, Go or Python. That conversation is free and it takes twenty minutes.
FAQ
Proof
Swasthya Sarathi
A website and mobile app development project for a multi-service healthcare companion — It helps peo...
Read itMV Tech Education
A website development project for a Bihar vocational institute. It is a course list and admissions s...
Read itPatna Taxi
A website development project for a Patna and Muzaffarpur cab operator. It is a fast taxi-booking si...
Read itReact that is built on the server, ranks in Google and does not send 300 KB of JavaScript...
ExploreThe framework we have built more business systems on than any other. Laravel 12 with Octan...
ExploreOne codebase, both stores, and a release you can fix the same afternoon. We build React Na...
ExploreLet's talk node.js development
A senior engineer reads every enquiry. You'll get a real answer — scope, risk and a number — within one business day.