scalecube-services is a free, open source api development & testing project written in Java and released under Apache-2.0. It has 639 GitHub stars, 112 forks and 17 open issues, and was last pushed 5 days ago. On this registry it ranks #170 of 186 tracked projects in API Development & Testing, with 5 head-to-head comparisons available.

What is scalecube-services?

ScaleCube Services is an Apache-2.0 licensed Java microservices library for teams building high-throughput, low-latency reactive distributed systems that need service discovery, load balancing, and stream-based communication without running a broker or middleware tier.

What it is

ScaleCube Services is an embeddable library, published on Maven Central as io.scalecube/scalecube-services-api, that provisions and interconnects microservices peers inside a cluster. Its architecture is fully mesh and brokerless: there is no single point of failure and no single point of bottleneck, because nodes talk to one another directly rather than through a central hop. Cluster membership is handled by the SWIM gossip protocol, which gives the library zero-configuration, automatic peer-to-peer service discovery, plus built-in failure detection and elasticity derived from that same detector. Communication is modular: API-gateway providers, service transports, and encoders are all pluggable, so the same programming model can run over different protocols and wire formats.

The concrete problem it solves is the middleware stack that usually sits between Java services. Reactive microservices communicate via streams and asynchronous data flows, exchanging information as it arrives instead of blocking, and the library implements the four interaction shapes this requires: fire and forget, request-response, request-stream, and bidirectional streaming. Where a typical deployment would assemble and operate a broker or gateway tier, ScaleCube pushes that responsibility into the JVM process itself, so services keep continuous availability while scaling over cores, JVMs, clusters, and regions. It lives in the JVM ecosystem and is tagged across actor-model, backpressure, cluster-membership, gossip-protocol, IPC, low-latency, and Kubernetes topics.

Key capabilities

  • Provisions and interconnects microservices peers in a cluster with zero configuration, using the SWIM cluster membership protocol for peer-to-peer discovery.
  • Supports four message exchange patterns: Fire And Forget, Request Response, Request Stream, and Request bidirectional.
  • Implements Reactive Streams semantics with an asynchronous, non-blocking programming model, and provides natural circuit breaking through the discovery and failure detector.
  • Pluggable API-gateway providers: http, websocket, and rsocket.
  • Pluggable service transports: tcp, aeron, and rsocket.
  • Pluggable encoders: JSON, SBE, and Google protocol buffers, with pluggable authentication and authorization providers.
  • Routing and balancing strategies for both stateless and stateful services, with service instance tagging and service discovery partitioning via namespace hierarchies in multi-cluster deployments.

Who uses it and how

  • Teams scaling a single service across cores, JVMs, clusters, and regions without reworking the communication layer.
  • Multi-cluster deployments that partition service discovery using a hierarchy of namespaces.
  • Stateful services that need instance tagging and state-aware routing, alongside stateless services using standard balancing strategies.
  • Kubernetes environments, reflected in the project topics, where peers join the same cluster and discover each other automatically.
  • Existing Java applications that embed the library rather than adopting a separate standalone service mesh or middleware deployment.

Getting started

Add the Maven Central artifact io.scalecube/scalecube-services-api to a Java project. The basic usage example provisions two cluster nodes: a seed member that provisions no services, then a second member that joins the seed and provisions a GreetingService instance, after which the seed node consumes that service remotely.

How it compares

No list of paid products this project replaces is provided in the facts, and no comparable library is named. It therefore stands alone in this registry among microservices libraries; the README references Reactor only as the underlying technology for reactive streams support, not as an alternative to the project.

When to use it — and when not to

A self-hoster is operating a JVM cluster and must be comfortable with Java, Maven, and cluster membership behaviour, since no database, storage layer, SMTP service, or managed hosting option is described in the facts. Teams outside the JVM, or those who want a packaged API gateway product rather than an embeddable library, should look elsewhere. The honest limitation is documentation shape: the README excerpt is a summary and feature list, with the actual user guide hosted externally at scalecube.github.io, so evaluating the operational details requires going beyond the repository page.

project readme (upstream, from github) — read inline

scalecube-services

Maven Central SourceSpy Dashboard

MICROSERVICES 2.0

ScaleCube is a microservices library designed for high throughput and lower latency, catering to scalable and reactive system needs. It excels in API gateway integration, service discovery, and load balancing, employing the SWIM protocol for efficient cluster management. Its modular architecture supports various pluggable communication modules, enabling seamless and flexible deployments. With a focus on real-time stream processing and fault tolerance, ScaleCube ensures optimal performance and reliability for distributed microservices environments.

Reactive microservices communicate via streams, utilising asynchronous data flows to exchange information between services. This approach enhances system responsiveness and scalability by allowing services to process and react to data as it arrives, without blocking operations.

In practice, this involves using technologies and protocols that support reactive streams, such as Reactor. These tools enable the development of highly responsive, resilient systems capable of handling dynamic workloads efficiently.

A fully mesh, brokerless architecture is particularly beneficial for high-performing, reliable, and scalable applications.
It ensures continuous availability and responsiveness, making it ideal for real-time data processing, large-scale distributed systems, and environments where minimizing latency matters.

ScaleCube’s fully mesh architecture delivers a robust, efficient, and scalable solution for modern microservices applications, enhancing system performance and reliability without the need for complex middleware setups.
ScaleCube Services Features:
  • Provision and interconnect microservices peers in a cluster
  • Fully Distributed with No single-point-of-failure or single-point-of-bottleneck
  • Fast - Low latency and high throughput
  • Scaleable over- cores, jvms, clusters, regions.
  • Built-in Service Discovery and service routing
  • Zero configuration, automatic peer-to-peer service discovery using SWIM cluster membership protocol
  • Simple non-blocking, asynchronous programming model
  • 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.
  • Built-in failure detection, fault tolerance, and elasticity
  • Routing and balancing strategies for both stateless and stateful services
  • Embeddable into existing applications
  • Natural Circuit-Breaker via scalecube-cluster discovery and failure detector.
  • Support Service instance tagging.
  • Support Service discovery partitioning using hierarchy of namespaces in a multi-cluster deployments.
  • Modular, flexible deployment models and topology
  • pluggable api-gateway providers (http / websocket / rsocket)
  • pluggable service transports (tcp / aeron / rsocket)
  • pluggable encoders (json, SBE, Google protocol buffers)
  • pluggable service security authentication and authorization providers.

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.
// service definition
@Service("io.scalecube.Greetings")
public interface GreetingsService {
  @ServiceMethod("sayHello")
	  Mono<Greeting> sayHello(String name);
	}
}
// service implementation
public class GreetingServiceImpl implements GreetingsService {
 @Override
 public Mono<Greeting> sayHello(String name) {
   return Mono.just(new Greeting("Nice to meet you " + name + " and welcome to ScaleCube"));
	}
}

//1. ScaleCube Node node with no members (container 1)
Microservices seed = Microservices.builder()
  .discovery("seed", ScalecubeServiceDiscovery::new)
	.transport(RSocketServiceTransport::new)
	.startAwait();

// get the address of the seed member - will be used to join any other members to the cluster.
final Address seedAddress = seed.discovery("seed").address();

//2. Construct a ScaleCube node which joins the cluster hosting the Greeting Service (container 2)
Microservices serviceNode = Microservices.builder()
  .discovery("seed", ep -> new ScalecubeServiceDiscovery(ep)
		.membership(cfg -> cfg.seedMembers(seedAddress)))
	.transport(RSocketServiceTransport::new)
	.services(new GreetingServiceImpl())
	.startAwait();

//3. Create service proxy (can be created from any node or container in the cluster)
//   and Execute the service and subscribe to incoming service events
seed.call().api(GreetingsService.class)
  .sayHello("joe").subscribe(consumer -> {
    System.out.println(consumer.message());
  });

// await all instances to shutdown.
Mono.whenDelayError(seed.shutdown(), serviceNode.shutdown()).block();

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.


@Service
public interface ExampleService {

  @ServiceMethod
  Mono<String> sayHello(String request);

  @ServiceMethod
  Flux<MyResponse> helloStream();

  @ServiceMethod
  Flux<MyResponse> helloBidirectional(Flux<MyRequest> requests);
}

API-Gateway:

Available api-gateways are rsocket, http and websocket

Basic API-Gateway example:


    Microservices.builder()
        .discovery(options -> options.seeds(seed.discoveryAddress()))
        .services(...) // OPTIONAL: services (if any) as part of this node.

        // configure list of gateways plugins exposing the apis
        .gateway(options -> new WebsocketGateway(options.id("ws").port(8080)))
        .gateway(options -> new HttpGateway(options.id("http").port(7070)))
        .gateway(options -> new RSocketGateway(options.id("rsws").port(9090)))

        .startAwait();

        // HINT: you can try connect using the api sandbox to these ports to try the api.
        // https://scalecube.github.io/api-sandbox/app/index.html

Maven

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:

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

Message codec providers:

Service discovery providers:

Binaries and dependency information for Maven can be found at http://search.maven.org.

https://mvnrepository.com/artifact/io.scalecube

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

Maven Central


 <properties>
   <scalecube.version>2.x.x</scalecube.version>
 </properties>

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

 <!-- scalecube apis   -->
 <dependency>
  <groupId>io.scalecube</groupId>
  <artifactId>scalecube-services-api</artifactId>
  <version>${scalecube.version}</version>
 </dependency>

 <!-- scalecube services module   -->
 <dependency>
  <groupId>io.scalecube</groupId>
  <artifactId>scalecube-services</artifactId>
  <version>${scalecube.version}</version>
 </dependency>


 <!--

     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:  -->
 <dependency>
  <groupId>io.scalecube</groupId>
  <artifactId>scalecube-services-transport-rsocket</artifactId>
  <version>${scalecube.version}</version>
 </dependency>

Sponsored by:

We Hire at exberry.io

https://exberry.io/career/

website

https://scalecube.github.io/

Frequently asked questions

Is scalecube-services free to use?

scalecube-services is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does scalecube-services do?

Microservices library - scalecube-services is a high throughput, low latency reactive microservices library built to scale. It features: API-Gateways, service-d

What is scalecube-services written in?

scalecube-services is primarily written in Java. Its source is publicly available at https://github.com/scalecube/scalecube-services, and it has 639 GitHub stars.