Armeria v0.95.0 Release Notes

Release Date: 2019-10-26 // over 4 years ago
  • ๐Ÿฑ ๐ŸŒŸ What is Armeria?

    Armeria is an open-source asynchronous HTTP/2 RPC/REST client/server library built on top of Java 8, Netty, Thrift and gRPC. Its primary goal is to help engineers build high-performance asynchronous microservices that use HTTP/2 as a session layer protocol. Visit the official web site and follow @armeria_project to check out many cool features you can't find in the official gRPC/Thrift implementation or other microservice frameworks.

    ๐Ÿฅณ New features

    • You can now bind multiple paths to an annotated service easily using @Path. #1822 #1870

      @Get@Post@Path("/a")@Path("/b")public String myAwesomeServcie(...) {...}

    • You can now make an annotated service run from blockingTaskExecutor by attaching @Blocking. #2078, #2187

      @Get("/myHeavyTask")@Blockingpublic HttpResponse reallyHeavyComputation(...) {...}

    • 0๏ธโƒฃ Armeria server now adds Server and Date headers to responses by default. #2137, #2188

      • If you do not want that behavior, you should call:

      Server.builder() .service(...) .disableServerHeader() .disableDateHeader() .build();

    • ๐Ÿ”ง You can now configure a Caffeine cache spec for HttpFileService. #916, #2142

      HttpFileServiceBuilder.forClassPath("/") .entryCacheSpec("maximumSize=512") .build()

    Or, using JVM option:
    -Dcom.linecorp.armeria.fileServiceCache=maximumSize=1024,expireAfterAccess=600s

    • ๐Ÿ‘€ You can now see the Armeria version in the metric. #2179

    ๐Ÿฑ ๐Ÿ’ช Improvements

    • Armeria server startup time is reduced to 80 percent when TLS is not used. #1645, #2184
    • ๐ŸŽ The performance of getting HTTP timestamps is improved by caching the values every second. #2196
      • Use HttpTimestampSupplier.currentTime() to take advantage of it.
    • ๐ŸŽ The performance of finding service is improved by not making an unused Map in RouteResult. #2153
    • ๐ŸŽ The performance of gRPC call is improved by using the singleton HTTP headers when a service does not create a new HTTP headers. #2152
    • ๐ŸŽ The performance of making metric Tags is improved by adding Tags in ascending order. #2150, #2163
    • ๐Ÿ“„ We now have favicon in our DocService. #2186

    ๐Ÿฑ ๐Ÿ‘ป Bug fixes

    • ServerHttpRequest.getRemoteAddress() now returns proper address. #2208
    • ๐Ÿ‘€ You can now see descriptive error messages when sslContext is not configured properly. #1844, #2124
    • ๐Ÿ— You can now build (Request|Response)Headers multiple times using builders. #2190, #2193
      • Previously, it raised ClassCastException if build() is called twice.
    • ๐Ÿ”ง NoRequestContextException is not raised anymore if you configure the name of the non-request thread.

      RequestContextCurrentTraceContext.builder() .nonRequestThread("RMI TCP Connection") .build()

    • NullPointerException is not raised anymore in Http1ClientCodec when the server sends multiple responses for one request. #2210

    • ๐Ÿ‘€ You can now see the access logs when the method of a request is not allowed and there are no services that match the path. #2159

    ๐Ÿšซ Breaking changes

    • 0๏ธโƒฃ All annotated services are run from EventLoop by default. #2187
      • Previously, if the return type is neither HttpResponse nor CompletableFuture, annotated services are run from blockingTaskExecutor.
    • ServerBuilder.tls() now throws a checked SSLException. #2124
    • ๐Ÿšš ServerBuilder.sslContext() methods are completly removed. #2124

    ๐Ÿฑ โ›“ Dependencies

    • Brave 5.7.0 -> 5.8.0
    • โฌ‡๏ธ Dropwizard 4.1.0 -> 4.1.1
    • gRPC 1.24.0 -> 1.24.1
    • Netty 4.1.42 -> 4.1.43
    • org.bouncycastle 1.63 -> 1.64
    • Prometheus 0.7.0 -> 0.8.0
    • RxJava2 2.2.12 -> 2.2.13
    • Spring Boot 2.1.8 -> 2.1.9
    • Tomcat
      • 9.0.26 -> 9.0.27
      • 8.5.43 -> 8.5.47
    • ZooKeeper 3.5.5 -> 3.5.6

    ๐Ÿฑ ๐Ÿ™‡โ€โ™‚๏ธ Thank you

    ๐Ÿš€ This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests: