====== Fegin ======
* [[https://github.com/OpenFeign/feign|Feign - makes writing java http clients easier]]
* [[https://github.com/OpenFeign/feign/tree/master/reactive|Feign Reactive]] Feign [[reactive_programming:reactor|Project Reactor]], [[reactive_programming:rxjava|RxJava]] support
* [[https://github.com/Playtika/feign-reactive|Feign-Reactive]] 비공식 Feign - [[springframework:webflux|Spring WebFlux]] 지원
* HTTP Api 호출 client를 Spring Data 처럼 interface 작성만으로 가능한 수준으로 만들어준다.
* see [[springframework:resttemplate|Spring RestTemplate]]
* [[springframework:webclient|WebClient]]
===== async/non-blocking =====
* openfeign 10.8 버전부터 Async 를 지원하고, 그 구현체로 non-blocking 인 Java 11 HTTP Client 와 Async [[java:apache_http_client|Apache Http Client]] 등을 지원한다.
===== retry =====
* [[https://www.baeldung.com/feign-retry|Retrying Feign Calls | Baeldung]]
===== Java 기본 HttpClient 사용시 문제점 =====
* Java 17 미만 버전의 HttpClient 에는 ''synchronized'' 메소드를 호출해서 동시에 요청이 몰릴경우 성능저하 이슈가 있음.
* [[java:httpclient|Java HttpClient]] 사용시 Java 17 이상 버전을 사용하고 "주의" 항목을 보고 사용
* [[java:apache_http_client|Apache Http Client]] 5 이상을 사용할 것.
==== 의존성 ====
implementation("io.github.openfeign:feign-hc5")
==== Spring Boot property 설정 ====
feign.httpclient.hc5.enabled: true
==== 참조 ====
* [[https://toss.tech/article/engineering-note-3|Feign 코드 분석과 서버 성능 개선]]
===== 참조 =====
* [[https://www.baeldung.com/intro-to-feign|Intro to Feign | Baeldung]]
* [[http://woowabros.github.io/experience/2019/05/29/feign.html|우아한 feign 적용기 - 우아한형제들 기술 블로그]]
* [[http://woowabros.github.io/experience/2019/12/20/feign2.html|feign 좀더 나아가기 - 우아한형제들 기술 블로그]]
* [[https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html|7. Declarative REST Client: Feign]]
* [[https://supawer0728.github.io/2018/03/11/Spring-Cloud-Feign/|(Spring Cloud) Feign]]
* [[https://blog.leocat.kr/notes/2019/03/27/feign-open-feign-configuration|[feign] open feign 설정 시 주의점 (@Configuration)]]
* [[https://www.baeldung.com/spring-cloud-openfeign|Introduction to Spring Cloud OpenFeign | Baeldung]]
* [[https://medium.com/@ruhshan_ahmed/customize-feigns-retry-mechanism-f015036a33ad|How To Customize Feign’s Retry Mechanism | by Ruhshan Ahmed Abir | Medium]]
* [[https://sabarada.tistory.com/118|[MSA] Spring Cloud Feign - With Hystrix]]
* [[https://www.baeldung.com/java-feign-file-upload|File Upload With Open Feign | Baeldung]]
* [[https://www.baeldung.com/feign-retry|Retrying Feign Calls | Baeldung]]
* [[https://www.youtube.com/watch?v=5LNOnVJKW_4|Declarative Clients in Spring by Rossen Stoyanchev and Olga Maciaszek-Sharma @ Spring I/O 2022 - YouTube]] : Spring Framework 6.x 와 feign 및 기타 Client Proxy Interface