An opinionated library to build highly available, lean and scalable cloud native microservices using NATS as the primary communication layer.
See Change Log for change log and what's new.
versions 1.1.14 and above target .net 10. If you need .net 9, please use 1.1.13.
Minimize undifferentiated work and get all the bells and whistles for a lean, high-performance, and scalable microservices setup. Check out the docs for detailed guides.
This SDK uses NATS as the primary way for services to communicate. Lightweight REST support is included for Kubernetes probes and webhook ingress. See REST Support for more details.
Modern C# is an excellent choice for building microservices! It's lean, fast, and fully open source with cross-platform support. With .NET's native Linux support, you get exceptional performance that rivals or exceeds many other languages. C# offers a perfect balance of developer productivity, type safety, and runtime efficiency—making it ideal for high-throughput, low-latency microservices architectures. Plus, with features like async/await, minimal APIs, and native AOT compilation, you can build services that are both performant and maintainable.
- Lower latency - Direct messaging without HTTP overhead
- Higher throughput - Optimized for performance at scale
- No protocol bloat - Lightweight and efficient
- Temporal decoupling - Services communicate asynchronously
- Built-in load balancing - No additional hops required
- Decentralized PKI - AuthN and AuthZ without central servers
- Zero exposed ports - Services connect to NATS, not each other
- Global distribution - Easy to create highly available, globally distributed services
- YouTube Playlist
- Official Docs
- Rethinking Microservices with NATS
- Escaping the HTTP Mindset (Podcast)
- NATS Super Clusters
Comprehensive guides available in the docs directory.
For data persistence, see SQL database operations and TigerBeetle ledger database usage.
This SDK is built on cloops.nats, which provides annotation-based consumer definitions and foundational features.
Install agent skill with
npx skills add connectionloops/cloops.microservices --skill cloops-microservices