Skip to content

armeria-0.74.0

Choose a tag to compare

@trustin trustin released this 19 Oct 06:28
98b5052

New features

  • Added UnprocessedRequestException which is raised by an Armeria HTTP client when a user sent a request with the stream ID higher than the lastStreamId of the GOAWAY frame sent by the server. #1392
    • When your request fails with UnprocessedRequestException, it is safe to retry the request even if the request was not idempotent, as explained in the GOAWAY section of RFC 7540. Consider using RetryingHttpClient with RetryStrategy.onUnprocessed(), which auto-retries the request on an UnprocessedRequestException:
      // HTTP
      final HttpClient client = new HttpClientBuilder("https://example.com")
              .decorator(RetryingHttpClient.newDecorator(RetryStrategy.onUnprocessed()))
              .build();
      // RPC
      final MyGrpcServiceStub client = new ClientBuilder("gproto+https://example.com")
              .decorator(HttpRequest.class, HttpResponse.class,
                         RetryingHttpClient.newDecorator(RetryStrategy.onUnprocessed()))
              .build(MyGrpcServiceStub.class);
  • Added HTTP/2 settings to ServerBuilder #1389 #1393
    final Server server = new ServerBuilder()
            .http2InitialConnectionWindowSize(...) // Default: 1 MiB
            .http2InitialStreamWindowSize(...)     // Default: 1 MiB
            .http2MaxFrameSize(...)                // Default: 16384
            .http2MaxStreamsPerConnection(...)     // Default: 2^31-1
            .http2MaxHeaderListSize(...)           // Default: 8192
            ...
  • Added http2MaxHeaderListSize property to ClientFactoryBuilder #1393
    final ClientFactory clientFactory = new ClientFactoryBuilder()
            .http2MaxHeaderListSize(...) // Default: 8192
            ...
  • Added System property flags that affects the default HTTP/2 settings:
    • com.linecorp.armeria.defaultHttp2InitialConnectionWindowSize
    • com.linecorp.armeria.defaultHttp2InitialStreamWindowSize
    • com.linecorp.armeria.defaultHttp2MaxFrameSize
    • com.linecorp.armeria.defaultHttp2MaxStreamsPerConnection
    • com.linecorp.armeria.defaultHttp2MaxHeaderListSize
  • Added MediaType.WASM_APPLICATION #1394

Improvements

  • Changed the default initial HTTP/2 connection- and stream-level flow-control window size from 65535 to 1048576 for both client and server side. #1389 #1393

Bug fixes

  • HttpRequest.completionFuture() never completes when the request has no content. #1387
  • Armeria closes the connection prematurely on an HTTP/2 GOAWAY frame. #1392
  • Armeria server may close the connection prematurely when a client sends a too large request. #1393

Breaking changes

  • Some properties and flags related with HTTP/1 and HTTP/2 have been renamed for consistency. #1393
    • All protocol-related property names now start with protocol name, e.g.
      • (GOOD) http1MaxInitialLineLength (BAD) maxHttp1InitialLineLength
      • (GOOD) http2InitialConnectionWindowSize (BAD) initialHttp2ConnectionWindowSize
    • Please check your JVM's system properties since they were renamed in the same manner.

Dependencies

  • Brave 5.4.2 -> 5.4.3
  • Guava 26.0 -> 27.0
  • Micrometer 1.0.6 -> 1.0.7
  • Spring Boot 2.0.5 -> 2.0.6, 1.5.16 -> 1.5.17