moleculerjs/moleculer là một trong những repo phía máy chủ mà TopGit theo dõi, hiện có 6.4k sao, viết chủ yếu bằng JavaScript. :rocket: Progressive microservices framework for Node.js
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Moleculer is a fast, modern and powerful microservices framework for Node.js. It helps you to build efficient, reliable & scalable services. Moleculer provides many features for building and managing your microservices.
Website: https://moleculer.services
Documentation: https://moleculer.services/docs
Why Moleculer?
Moleculer gives you the distributed-systems layer as part of the framework, so you don't have to run a platform to get it:
No orchestrator required. Nodes find each other over the transporter (NATS, Redis, Kafka, MQTT, AMQP — or plain TCP with no broker at all). Service discovery is a built-in registry, not Consul, etcd or a service mesh.
Scale by starting another process. Every broker balances requests and events across the instances it can see (round-robin, random, CPU-usage, latency, sharding) with zero configuration.
Fault tolerance is a broker option. Timeout, retry, circuit breaker, bulkhead and fallback are configuration, not five more dependencies.
The same code from one process to many. Start as a modular monolith (transporter: null), split later by moving services to another process — the service code and the broker.call() sites stay the same.
Batteries included, and pluggable. Caching, parameter validation, metrics, tracing, serializers, loggers and middlewares all ship with it, and all of them can be swapped.
Top sponsors
What's included
Services and communication
Promise-based solution (async/await compatible)
request-reply concept
support event driven architecture with balancing
built-in service registry & dynamic service discovery
The interesting part is what happens when that service moves to its own process. Add a transporter, start the same file twice, and call it from a third process — no addresses to configure, no registry to run.
// node.js — the same service, now on its own node
const { ServiceBroker } = require("moleculer");
const broker = new ServiceBroker({
nodeID: process.argv[2],
transporter: "nats://localhost:4222"
});
broker.createService({
name: "math",
actions: {
add(ctx) {
return { result: Number(ctx.params.a) + Number(ctx.params.b), from: broker.nodeID };
}
}
});
broker.start();
// client.js — it only knows the action name
const { ServiceBroker } = require("moleculer");
const broker = new ServiceBroker({ nodeID: "client", transporter: "nats://localhost:4222" });
broker.start()
.then(() => broker.waitForServices("math"))
.then(async () => {
for (let i = 0; i < 4; i++)
console.log(await broker.call("math.add", { a: 5, b: 3 }));
await broker.stop();
});
Open the http://localhost:3000/ link in your browser. It shows a welcome page that contains more information about your project & you can test the generated services.
:tada: Congratulations! Your first Moleculer-based microservices project is created. Read our documentation to learn more about Moleculer.
Examples
The moleculer-examples repository contains runnable projects, each with its own README and a run.sh that reproduces the whole demo:
Microservices without Kubernetes — one process → many processes → scaling a copy, with a moleculer-web gateway and a docker-compose deployment
Moleculer vs NestJS — the same service in both frameworks, side by side
TypeScript — shared contract file, schema style and class style, typed caller
From a modular monolith to microservices — extracting services in three stages
Service discovery and load balancing — scaling and crashes with traffic running, balancing strategies, TCP transporter
Circuit breaker, retry and timeout — the fault-tolerance features against a deliberately flaky service
Event-driven pub/sub — emit vs broadcast, groups, the same code on NATS, Redis and Kafka, durable channels
Moleculer vs gRPC vs tRPC — an RPC protocol compared with a service layer, and how to combine them
Plus two full applications: a blog site and the RealWorld backend.
Official modules
We have many official modules for Moleculer. Check our list!
Supporting
Moleculer is an open source project. It is free to use for your personal or commercial projects. However, developing it takes up all our free time to make it better and better on a daily basis. If you like Moleculer framework, please support it.
Thank you very much!
For enterprise
Available as part of the Tidelift Subscription.
The maintainers of moleculer and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.
Documentation
You can find here the documentation.
Changelog
See CHANGELOG.md.
Security contact information
To report a security vulnerability, please use the Tidelift security contact.
Tidelift will coordinate the fix and disclosure.
Contributions
We welcome you to join in the development of Moleculer. Please read our contribution guide.
moleculerjs/moleculer có 6.4k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/moleculerjs/moleculer. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
moleculerjs/moleculer có những chủ đề gì?
GitHub topics của moleculerjs/moleculer: "distributed-systems", "microservice", "microservice-framework", "microservices", "moleculer", "nodejs". TopGit xếp repo vào nhóm Backend.
moleculerjs/moleculer còn đang phát triển không?
Commit gần nhất trên moleculerjs/moleculer là 4 tháng trước (theo timestamp GitHub). Repo có 604 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
moleculerjs/moleculer là gì?
moleculerjs/moleculer (moleculerjs/moleculer) là dự án JavaScript trên GitHub. Theo mô tả gốc: :rocket: Progressive microservices framework for Node.js
moleculerjs/moleculer so với các dự án Backend khác thế nào?
moleculerjs/moleculer được TopGit xếp vào nhóm Backend, với 6.4k sao GitHub và viết bằng JavaScript. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
moleculerjs/moleculer viết bằng ngôn ngữ gì?
moleculerjs/moleculer chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao moleculerjs/moleculer được xếp vào nhóm Backend?
TopGit xếp moleculerjs/moleculer vào nhóm Backend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "distributed-systems", "microservice", "microservice-framework"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
moleculer có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về moleculer.