0.95.0 release notes

26th October 2019

🥳 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")
    @Blocking
    public HttpResponse reallyHeavyComputation(...) {...}
  • 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

  • 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 completely 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