Build a reactive microservice at your pace, not theirs.
Armeria is your go-to microservice framework for any situation. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
“ Brought to you by the creator of Netty and his colleagues at LY Corporation ”
gRPC, Thrift, REST, static files? You name it. We serve them all.
Let's embrace the reality — we almost always have to deal with more than one protocol. It was once Thrift, today it's gRPC, and REST never gets old. At the same time, you sometimes have to handle health check requests from a load balancer or even serve some static files.
Armeria is capable of running services using different protocols, all on a single port. No need for any proxies or sidecars. Enjoy the reduced complexity and points of failure, even when migrating between protocols!
Server
.builder()
.service(
"/hello",
(ctx, req) -> HttpResponse.of("Hello!"))
.service(GrpcService
.builder()
.addService(myGrpcServiceImpl)
.build())
.service(
"/api/thrift",
ThriftService.of(myThriftServiceImpl))
.service(
"prefix:/files",
FileService.of(new File("/var/www")))
.service(
"/monitor/l7check",
HealthCheckService.of())
.build()
.start();
Headache-free RPC with documentation service
RPC protocols were often more difficult to work with than RESTful APIs. How would you make an ad-hoc call to your gRPC service when you can't find the right
.proto
file? How would you help your colleague reproduce your problem by making the same call?Armeria's documentation service allows you to browse the complete list of services and their documentation from a web browser. You can also make a real RPC call in human friendly JSON format and share the URL of the call with your colleague. Who said RPC is difficult to work with?
Armeria was pivotal in our effort to refactor core components of our search system into separate services. Decorators make reusing existing components and building new ones a breeze. This helped streamline the integration of our new services with our existing infrastructure, including logging, monitoring, tracing, service discovery, and RPC. The modern Java API is a joy to use and the asynchronous architecture delivers great performance with high concurrency. The Armeria community has been very welcoming and the maintainers were very responsive to our needs during our migration process and beyond. We are now running several search and discovery services built on Armeria and it has become our framework of choice for building new Java services.— Renaud Bourassa
Slack
Fuel your request pipeline with reusable components
There are so many cross-cutting concerns you need to address when building a microservice — metrics, distributed tracing, load balancing, authentication, rate-limiting, circuit breakers, automatic retries, etc.
Armeria solves your problems by providing various reusable components called ‘decorators’ in a clean, consistent, flexible and user-friendly API. You can also write a custom decorator if ours doesn't work for your use case.
Server
.builder()
.service((ctx, req) -> ...)
.decorator(
MetricCollectingService.newDecorator(...))
.decorator(
BraveService.newDecorator(...))
.decorator(
AuthService.newDecorator(...))
.decorator(
ThrottlingService.newDecorator(...))
.build()
.start();
Integrate seamlessly with your favorite frameworks & languages
Wanna try some cool technology while using Spring Boot or Dropwizard? That's absolutely fine. Armeria integrates them without getting in the way.
It serves gRPC or Thrift requests at high efficiency while leaving other requests to Spring MVC, WebFlux or Dropwizard with minimal changes.
It serves gRPC or Thrift requests at high efficiency while leaving other requests to Spring MVC, WebFlux or Dropwizard with minimal changes.
Got a legacy webapp you need to keep running until you migrate off? No problem! Armeria can serve any legacy webapps that run on top of Tomcat or Jetty until you finish your migration. Adios, maintenance hell!
Armeria has eased our adoption of gRPC at Afterpay. Serving gRPC, documentation, health checks and metrics on a single port (with or without TLS) gives us the functionality of a sidecar like Envoy in a single process. Automated serving of API documentation, complete with sample payloads, allows simple ad-hoc gRPC requests straight from the browser. Distributed tracing is trivial to configure using the built-in Brave decorators. Logging request bodies, performing retries or circuit breaking are all built-in. The friendly devs rapidly respond to issues and feature requests. Armeria is becoming the default stack for gRPC at Afterpay.— Andrew O'Malley
Afterpay
Flexible service discovery and client-side load-balancing
Armeria provides various service discovery mechanisms, from Kubernetes-style DNS records to ZooKeeper data nodes. Send periodic or long-polling pings to exclude unhealthy endpoints autonomously. Choose the best load-balancing strategy for you — weighted round-robin, sticky-session, etc. You can even write a custom service discovery or load-balancing strategy.
EndpointGroup group =
DnsAddressEndpointGroup.of(
"k8s.default.svc.cluster.local.");
EndpointGroup healthyGroup =
HealthCheckedEndpointGroup.of(
group,
"/monitor/l7check");
WebClient client =
WebClient.of("h2c", healthyGroup);
client.get("/path");