Awesome Open Source
Awesome Open Source


Build Status Codacy Badge Maven Central


An open-source project that is focused on streamlining reactive-programming of Microservices Reactive-systems that scale, built by developers for developers.

ScaleCube Services provides a low latency Reactive Microservices library for peer-to-peer service registry and discovery based on gossip protocol, without single point-of-failure or bottlenecks.

Scalecube more gracefully address the cross cutting concernes of distributed microservices architecture.

ScaleCube Services Features:
  • Provision and interconnect microservices as a service-mesh (cluster)
  • Reactive Streams support.
    • Fire And Forget - Send and not wait for a reply
    • Request Response - Send single request and expect single reply
    • Request Stream - Send single request and expect stream of responses.
    • Request bidirectional - send stream of requests and expect stream of responses.
  • No single-point-of-failure or single-point-of-bottleneck
  • Cluster aware and distributed
  • Modular, flexible deployment models and topology
  • Zero configuration, automatic peer-to-peer service discovery using gossip
  • Simple non-blocking, asynchronous programming model
  • Resilient due to failure detection, fault tolerance, and elasticity
  • Routing and balancing strategies for both stateless and stateful services
  • Low latency and high throughput
  • Takes advantage of the JVM and scales over available cores
  • Embeddable to existing Java applications
  • Natural Circuit-Breaker due to tight integration with scalecube-cluster failure detector.
  • Support Service instance tagging.
  • pluggable service transport
  • pluggable encoders

User Guide:

Basic Usage:

The example provisions 2 cluster nodes and making a remote interaction.

  1. seed is a member node and provision no services of its own.
  2. then microservices variable is a member that joins seed member and provision GreetingService instance.
  3. finally from seed node - create a proxy by the GreetingService api and send a greeting request.
    //1. ScaleCube Node node with no members
    Microservices seed = Microservices.builder().startAwait();

    //2. Construct a ScaleCube node which joins the cluster hosting the Greeting Service
    Microservices microservices = Microservices.builder()
        .seeds(seed.cluster().address()) // some address so its possible to join the cluster.
        .services(new GreetingServiceImpl())

    //3. Create service proxy
    GreetingsService service =;

    // Execute the services and subscribe to service events
    service.sayHello("joe").subscribe(consumer -> {

Basic Service Example:

  • RequestOne: Send single request and expect single reply
  • RequestStream: Send single request and expect stream of responses.
  • RequestBidirectional: send stream of requests and expect stream of responses.

A service is nothing but an interface declaring what methods we wish to provision at our cluster.

public interface ExampleService {

  Mono<String> sayHello(String request);

  Flux<MyResponse> helloStream();
  Flux<MyResponse> helloBidirectional(Flux<MyRequest> requests);


With scalecube-services you may plug-and-play alternative providers for Transport,Codecs and discovery. Scalecube is using ServiceLoader to load providers from class path,

You can think about scalecube as slf4j for microservices - Currently supported SPIs:

Transport providers:

  • rsocket-services-transport: using rsocket to communicate with remote services.

Message codec providers:

Service discovery providers:

Binaries and dependency information for Maven can be found at

Maven Central

To add a dependency on ScaleCube Services using Maven, use the following:

 <!-- -------------------------------------------
   scalecube core and api:   
 ------------------------------------------- -->

 <!-- scalecube apis   -->
 <!-- scalecube services module   -->


     Plugins / SPIs: bellow a list of providers you may choose from. to constract your own configuration:
     you are welcome to build/contribute your own plugins please consider the existing ones as example.


 <!-- -------------------------------------------
   scalecube transport providers:   
 ------------------------------------------- -->
 <!-- -------------------------------------------
   scalecube message serialization providers:
   ------------------------------------------- -->

 <!-- jackson scalecube messages codec -->

<!-- protostuff scalecube messages codec -->

 <!-- -------------------------------------------
    scalecube service discovery provider   
   ------------------------------------------- -->

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
java (31,780
serverless (673
rpc (290
reactive (286
tcp (250
flux (100
mono (89
service-mesh (83
reactive-streams (60
ipc (55
reactor (35
netty4 (21