{"repo":"nats-rpc/nrpc","free":true,"listed":false,"github":"https://github.com/nats-rpc/nrpc","clone":"git clone https://github.com/nats-rpc/nrpc.git","description":"nRPC is like gRPC, but over NATS","language":"Go","stars":706,"topics":["grpc","protobuf","rpc-framework","go"],"license":"Apache-2.0","category":"networking-infra","readme_excerpt":"nRPC nRPC is an RPC framework like gRPC, but for NATS. It can generate a Go client and server from the same .proto file that you'd use to generate gRPC clients and servers. The server is generated as a NATS MsgHandler. The Specifications describes how nRPC translates protobuf services and methods into NATS patterns. Why NATS? Doing RPC over NATS' request-response model has some advantages over a gRPC model: - Minimal service discovery : The clients and servers only need to know the endpoints of a NATS cluster. The clients do not need to discover the endpoints of individual services they depend on. - Load balancing without load balancers : Stateless microservices can be hosted redundantly and connected to the same NATS cluster. The incoming requests can then be random-routed among these using NATS queueing. There is no need to setup a (high availability) load balancer per microservice. The lunch is not always free, however. At scale, the NATS cluster itself can become a bottleneck. Features of gRPC like streaming and advanced auth are not available. Still, NATS - and nRPC - offer much lower operational complexity if your scale and requirements fit. At RapidLoop, we use this model for our OpsDash SaaS product in production and are quite happy with it. nRPC is the third iteration of an internal library. Overview nRPC comes with a protobuf compiler plugin protoc-gen-nrpc , which generates Go code from a .proto file. Given a .proto file like helloworld.proto, the usage is like thi","default_branch":null,"files":null,"tree":[],"storefront":"/r/nats-rpc","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nats-rpc/nrpc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}