kptfh/feign-reactive

First request timeout.

JasonPEP opened this issue · 3 comments

The request for the first time take very long.

kptfh commented

The reason may be ribbon to eureka discovery roundtrip. Search for ribbon eager load.
Anyway actual version is here https://github.com/Playtika/feign-reactive

Hi @kptfh,
I didn't use the service discovery, I specify the url to request, but But every first request take long time, I think may be the initial thread pool of r-http-kqueue-X, do you have any ideas?


Here is my define feign client

@ReactiveFeignClient(url = "http://localhost:8080"
        , name = "search"
        , fallback = SearchReactiveFallback.class)
public interface SearchReactiveInterface {

    @GetMapping("s")
    Mono<String> search(@RequestParam("keyword") String keyword);
}

Here is test code

long begin = System.currentTimeMillis();
Mono<String> search = searchReactiveInterface.search("abc");
search.retry(1).subscribe(log::info);
log.info("{}", System.currentTimeMillis() - begin);

The every first request takes more than 5 seconds.

all right, maybe i put the issue in wrong place.