2

We use Spring Cloud Gateway for Authentication. Spring Security OAuth2LoginAuthenticationWebFilter use Netty HTTP Client to send request to Identity provider. Netty has connection pool which is messed up by load balancing server between Netty and Identity Provider which disconnect the idle connection in the pool. Is there any way to disable Netty HTTP client connection pool in Spring Security?

I tried configure Spring Cloud Gateway HTTP Client parameters but it does not affect the Netty HTTP Client which is used by Spring Security.

1 Answer 1

2

You can do this by simply adding below lines in your application.yml file

spring:
  cloud:
    gateway:
      httpclient:
        pool:
          type: disabled
Sign up to request clarification or add additional context in comments.

2 Comments

is there any downside of disabling connection pool ? Will it cause performance issues etc for heavy traffic ?
It's going to have a heavy impact of performance. If you use TLS for backend communication, then it's going to massive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.