reactor-netty

WebClient doesn't read response until request write is completed.

蓝咒 提交于 2020-12-04 00:38:17
问题 I'm trying to implement streaming proxy. I faced with the issue with WebClient from spring reactive. Could anyone help me to understand Do I some wrong way or it's just a bug from WebClient side? Stack: reactor-netty 0.7.8.RELEASE spring-boot 2.0.4.RELEASE Desc: I want to proxy a long stream to external service and then forward stream of responses to the requester. Streaming is happening using chunks (HTTP 1.1 Transfer-Encoding : chunked). External service processes every chunk and sends to

WebClient doesn't read response until request write is completed.

江枫思渺然 提交于 2020-12-04 00:38:02
问题 I'm trying to implement streaming proxy. I faced with the issue with WebClient from spring reactive. Could anyone help me to understand Do I some wrong way or it's just a bug from WebClient side? Stack: reactor-netty 0.7.8.RELEASE spring-boot 2.0.4.RELEASE Desc: I want to proxy a long stream to external service and then forward stream of responses to the requester. Streaming is happening using chunks (HTTP 1.1 Transfer-Encoding : chunked). External service processes every chunk and sends to

Spring cloud gateway - io.netty.util.internal.OutOfDirectMemoryError

隐身守侯 提交于 2020-07-23 07:27:05
问题 I am using below stack Spring Cloud Gateway Hoxton Release, Java 1.8, Linux OS I am seeing below exception which goes away after a restart but again shows up after some time. I have not done any explicit settings for direct memory. Below are the JVM arguments used - -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=60 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps

Spring cloud gateway - io.netty.util.internal.OutOfDirectMemoryError

*爱你&永不变心* 提交于 2020-07-23 07:26:05
问题 I am using below stack Spring Cloud Gateway Hoxton Release, Java 1.8, Linux OS I am seeing below exception which goes away after a restart but again shows up after some time. I have not done any explicit settings for direct memory. Below are the JVM arguments used - -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=60 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps

Spring cloud gateway - io.netty.util.internal.OutOfDirectMemoryError

喜欢而已 提交于 2020-07-23 07:25:31
问题 I am using below stack Spring Cloud Gateway Hoxton Release, Java 1.8, Linux OS I am seeing below exception which goes away after a restart but again shows up after some time. I have not done any explicit settings for direct memory. Below are the JVM arguments used - -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=60 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps

How to configure netty connection-timeout for Spring WebFlux

流过昼夜 提交于 2020-05-15 05:45:10
问题 I am running spring cloud gateway (which I understand to be built on Spring Webflux) behind an AWS loadbalancer and I am receiving intermittent 502 errors. Upon investigation, it appears the issue has to do with connection timeouts between the loadbalancer and my nodes. From some investigation it appears that the underlying netty server has a default timeout of 10 seconds. I determined this using the following command... time nc -vv 10.10.xx.xxx 5100 Connection to 10.10.xx.xxx 5100 port [tcp/

Why spring webflux is choosing jetty by default and then failing?

旧街凉风 提交于 2020-01-05 09:37:08
问题 I am trying to run Spring boot 2.0.0.M7 based application. Here are spring related dependencies I have in my build.gradle: compile "org.springframework.boot:spring-boot-starter-webflux:2.0.0.M7" compile "org.springframework.boot:spring-boot-starter-data-ldap:2.0.0.M7" compile "org.springframework.boot:spring-boot-starter-actuator:2.0.0.M7" Based on autoconfiguration report, is it possible to tell WHY spring wants to use Jetty as the reactive engine by default (when actually reactor Netty is

Configure HostnameVerifier with reactor netty for spring-webflux WebClient

瘦欲@ 提交于 2020-01-01 08:35:10
问题 I'm trying to configure spring-webflux WebClient (with reactor netty under the hood) with ssl and client hostname verification. I'm provided with javax.net.ssl.SSLContext, HostnameVerifier and a list of trusted hostnames (as string list). So far I've configured WebClient with my SSLContext, but I can't find a way to configure hostname verification. To state my problem: I have a set of trusted services hostnames (String list) and a HostnameVerifier. I want to configure my WebClient with it. Is

How to limit request payload size using Spring Webflux?

时光毁灭记忆、已成空白 提交于 2019-12-22 00:17:37
问题 Using Spring Webflux, I need to limit the payload size of incoming HTTP requests (e.g. to say 5MB). Is this something configurable out-of-the-box? If not, which APIs can we use to implement this behavior (e.g. return a 413 if the payload is too big). 回答1: I guess you want to do this to prevent Denial Of Service attacks by malicious or misbehaving clients. The usual recommendation is to not directly connect HTTP application servers to the Internet, but instead via an HTTP reverse proxy server

Spring WebFlux: Only one connection receive subscriber allowed

梦想与她 提交于 2019-12-19 21:49:08
问题 I am writing a simple app with Spring 5 Webflux and Kotlin. I am trying to implement PUT endpoint in a following way: PUT("/confs/{id}", { val id = it.pathVariable("id") ServerResponse.ok().body(service.save(it.bodyToMono(Item::class.java)), Item::class.java) }) The trick on save is that I try to read a city name from item, resolve geo coordinates, overwrite them in original item and then save to Mongo using Spring Data Mongo Reactive repo. fun save(item: Mono<Item>): Mono<Item> { val geo =