This article walks through the complete lifecycle of Spring Cloud Feign in a Spring Boot 2.2.13 application, covering how to enable Feign, scan and register @FeignClient beans, inject them into controllers, create dynamic proxy instances, and finally execute remote calls with load‑balancing and Hystrix support.
This article examines three frequent challenges when using Feign in Spring Cloud—where to place the client, whether to wrap Feign interfaces, and how to handle business exceptions—offering a detailed comparison of two call styles, a ResponseBodyAdvice‑based wrapper solution, and a custom error decoder to propagate original exceptions.
This guide explains why token relay is essential for Spring Cloud microservice calls, how Feign’s default behavior blocks token propagation when circuit breaking is enabled, and provides a step‑by‑step solution using a custom RequestInterceptor and InheritableThreadLocal to forward JWT tokens across threads.
This article provides a detailed tutorial on OpenFeign, covering its purpose, differences from Feign, environment preparation, service provider and consumer creation, various parameter passing methods, timeout handling, logging enhancement, HTTP client replacement, GZIP compression, and integration with Sentinel for circuit breaking in Spring Cloud microservices.
This article explains Feign’s internal workflow, annotation attributes, GZIP compression, logging, timeout configuration, and multi‑parameter handling in Spring Cloud, providing code examples and practical tips for building resilient microservice clients.
This tutorial explains what OpenFeign is, how it differs from Feign, walks through environment preparation, service provider and consumer creation, various parameter passing methods, timeout handling, logging, HTTP client replacement, GZIP compression, and circuit‑breaker integration, providing a comprehensive guide for Spring Cloud microservice developers.
The article analyzes why the Dubbo RPC framework is ill‑suited for transmitting files due to serialization and single‑connection constraints, compares it with HTTP's streaming capabilities, and shows how Feign can handle uploads while still facing memory‑usage challenges, concluding with practical recommendations for file‑transfer scenarios.
This article explains how to achieve gray release routing in a Spring Cloud microservice architecture by customizing Ribbon's load‑balancing rule, using Eureka metadata, adding version information via Zuul and Feign/RestTemplate interceptors, and configuring thread‑local propagation for consistent service selection.
This article provides a comprehensive overview of Spring Cloud's core components—including Eureka, Ribbon, Feign, Zuul, Hystrix, and Config—explaining their principles, advantages, and practical usage within microservice architectures for building scalable, resilient backend systems.
This article provides a comprehensive tutorial on the fundamentals of microservices, explains how to set up a Spring Cloud project with Maven and IntelliJ IDEA, configures Eureka registration and discovery, demonstrates service provider and consumer implementations using Spring Boot, and shows how to achieve high‑availability Eureka clusters with load‑balanced calls via Ribbon and Feign.
This article provides a comprehensive collection of Spring Cloud interview questions covering fundamentals, service registration and discovery, load balancing, Hystrix circuit breaking, Feign, Ribbon, Eureka vs Zookeeper, Spring Cloud Bus, microservice architecture, RPC principles, and related best‑practice insights for backend developers.
This article presents a comprehensive set of practical guidelines for Spring Cloud microservice development, covering Maven project structure, core and starter modules, versioning conventions, service invocation via SDK and Feign, RESTful API design rules, and gateway responsibilities such as access control and gray release.
This article explains the concept of load balancing, illustrates it with a bank queue analogy, and demonstrates how to register multiple Spring Cloud service instances, use Feign and DiscoveryClient, configure Ribbon's load‑balancing interceptor, and customize the balancing rule for effective microservice traffic distribution.
This article explains the purpose and inner workings of Feign in Spring Cloud Netflix, covering how it creates dynamic proxy objects for declarative HTTP calls, integrates with Hystrix for circuit‑breaker support, and works with Ribbon for client‑side load balancing within microservice architectures.
The article explains common mistakes of using API gateways together with service registries as internal proxies, shows how this adds latency and complexity, and offers guidance on when to use gateways versus direct service‑to‑service calls in microservice architectures.
This guide introduces Spring Cloud Square, a Retrofit‑based replacement for Spring Cloud Feign, explains its core components like OkHttp and Retrofit, provides step‑by‑step setup, bean configuration, and code examples for both basic and advanced declarative client usage, and summarizes its current limitations.
This article explains Feign’s internal workflow, details its key annotations, shows how to enable GZIP compression, configure logging, set timeouts, and handle multi‑parameter GET/POST requests, including custom request interceptors and dependency options for advanced Spring Cloud microservice communication.
This article explains how Spring Cloud Feign works, details its key annotations, shows how to enable GZIP compression, configure logging and timeouts, and demonstrates techniques for handling multiple parameters in GET and POST requests with code examples.
This article demonstrates how to secure microservice communication by adding a request token in Spring Cloud Gateway, implementing a global filter to validate the token, and configuring a Feign interceptor to automatically attach the required header, ensuring all services route through the gateway.
After upgrading an internal framework, a company’s UAT environment saw throughput drop from 53.9/s to 6.4/s due to abnormal Feign latency, prompting a deep dive with Arthas profiling, code tracing, and class‑loader analysis that uncovered costly JodaModule loading and class‑loader overhead, leading to targeted fixes that restored and even improved performance.
Faced with a legacy Dubbo service needing both Dubbo and HTTP protocols and a new Spring Cloud project requiring seamless Feign calls, this article details the challenges, the solution using Dubbo’s SPI Container extension, and how Arthas was employed to diagnose and resolve hidden loading errors.
The article examines two ways to define Feign interfaces in a microservice architecture—having the service producer define the Feign client (SPI) versus letting the service consumer define it (API)—and compares their constraints, flexibility, dependency management, and impact on development workflow.
This tutorial walks through setting up Spring Cloud microservices using Spring Boot, configuring Eureka for service registration, implementing Ribbon and Feign for client-side load balancing, and configuring high‑availability Eureka clusters, complete with Maven pom.xml, application.yml, and Java code examples.
This article explains how to configure connection and read timeouts for HTTP calls in Spring Cloud, compares Feign and Ribbon settings, reveals common pitfalls such as overly long timeouts and automatic retries, and provides practical solutions for improving concurrency and preventing duplicate requests in Java microservices.
This article provides a comprehensive overview of Spring Cloud’s core components—including Eureka for service registration, Ribbon for client‑side load balancing, Feign for declarative REST calls, Hystrix for circuit breaking, and Zuul as an API gateway—explaining their mechanisms, configurations, and interactions within a microservice architecture.
This tutorial walks through creating a Spring Cloud microservices architecture using Spring Boot, Eureka service registry, Ribbon load balancing, and Feign clients, covering project initialization in IntelliJ IDEA, Maven configuration, YAML setup, service implementation, high‑availability Eureka server clustering, and testing the end‑to‑end workflow.
This article provides a detailed introduction to Spring Cloud’s core modules—including Eureka service discovery, Ribbon load balancing, Feign declarative HTTP client, Zuul API gateway, Hystrix fault‑tolerance, and Config centralized configuration—explaining their principles, advantages, and typical usage scenarios in microservice architectures.
This article explains why the Kitty Cloud project integrates both Feign and Dubbo, discusses the need for dual‑protocol support during migration from Dubbo to Spring Cloud, presents three migration strategies, and shows how to implement and configure both HTTP and RPC calls within the same service.
This article explains how to integrate Netflix Hystrix into Spring Cloud applications to provide request timeout, circuit‑breaker, fallback, monitoring and resource isolation for microservice calls, including Maven setup, annotation usage, Feign client fallback configuration and disabling options.
This article explains why microservice calls need fault‑tolerance mechanisms, introduces Hystrix’s core features such as timeouts, circuit‑breaker, fallback, monitoring and resource isolation, and provides step‑by‑step code examples for integrating Hystrix and Feign in a Spring Cloud project.
This article explains the core concepts and components of Spring Cloud for building micro‑service systems, covering business scenarios, advantages of microservices, comparisons with Dubbo, Eureka service discovery, Ribbon and Feign load balancing, Zuul gateway, Hystrix fault tolerance, and centralized configuration management.
This article provides a comprehensive overview of Spring Cloud's core modules—including service discovery with Eureka, client‑side load balancing via Ribbon and Feign, API gateway functionality of Zuul, fault‑tolerance with Hystrix, and centralized configuration management with Config—illustrated through a typical e‑commerce order‑payment scenario and comparisons with Dubbo, Zookeeper, and Nginx.
This article explains the concepts of service circuit breaking and degradation, introduces Hystrix and its design goals, and provides step‑by‑step code examples for integrating Hystrix, Feign, and Spring Cloud components to achieve resilient microservice communication with fallback handling.
This article provides a comprehensive overview of Spring Cloud, covering why it should be learned, its core concepts, design goals, advantages and disadvantages, version compatibility with Spring Boot, major sub‑projects, configuration management, service discovery, load balancing, circuit breaking, Feign, and practical code examples for microservice development.
This article explains the principles and interactions of Spring Cloud's core components—Eureka for service registration, Ribbon for client‑side load balancing, Feign for declarative REST calls, Hystrix for circuit breaking, and Zuul as an API gateway—providing a comprehensive guide for building resilient microservice architectures.
This article explains what Spring Cloud is, its advantages for distributed microservices, the meaning of service registration and discovery, the purpose of load balancing, how Hystrix provides fault tolerance and circuit breaking, the role of Netflix Feign, and the function of Spring Cloud Bus for configuration refresh across instances.
This article explains how to implement token propagation between microservices in a Spring Cloud OAuth2 environment by configuring a Feign interceptor, parsing relevant source code, handling token extraction and relay, and addressing common pitfalls such as missing tokens and thread isolation issues.
This article reviews the Spring Cloud Greenwich.RELEASE launch, detailing Maven coordinates for Java 11 compatibility, new features such as upgraded Netflix components, CredHub configuration for Spring Cloud Config, OAuth2 integration in Spring Cloud Gateway, recent Feign enhancements, common pitfalls, and practical migration tips for developers.
This article demonstrates how to use Nacos for service registration and discovery in Spring Cloud and shows three convenient client consumption methods—enhanced RestTemplate, reactive WebClient, and declarative Feign—complete with configuration, code examples, and the underlying load‑balancing mechanism.
The article examines a real‑world Spring Cloud microservice case where naive timeout extensions mask deep performance issues, explains how massive data growth and complex SQL cause thread‑pool exhaustion, and provides step‑by‑step optimizations—including query refactoring, proper timeout settings, retries, and idempotency—to restore stability under high concurrency.
This tutorial walks through the fundamentals of distributed systems—explaining clusters, distributed architecture, the CAP theorem, and then dives deep into Spring Cloud components such as Eureka, Ribbon, Hystrix, Feign, Zuul, and Config, illustrating how they solve real‑world microservice challenges.
This article explains how to add multipart file‑upload support to Spring Cloud Feign by extending the client with feign‑form, configuring the server side with a Spring MVC controller, and providing a complete Java example with dependencies, client configuration, and a JUnit test.
When a Spring Cloud Feign client sends a request containing Java 8 date/time types like LocalDate, LocalTime, or LocalDateTime, the response may trigger JSON parse errors because Spring MVC serializes them as arrays, but Feign expects a proper object, which can be resolved by adding Jackson's JSR‑310 module and configuring the ObjectMapper.
This article explains how to configure Feign and Hystrix so that HTTP error responses from a downstream service are wrapped in a HystrixBadRequestException, allowing the calling service to receive the original status code without activating Hystrix's circuit‑breaker logic.
This tutorial walks through configuring Spring Cloud Ribbon and Spring Cloud Feign to perform client‑side load balancing for a compute-service, covering prerequisite setup, Maven dependencies, application code, REST client implementation, and verification of balanced requests across multiple service instances.
This article introduces the upcoming “Spring Cloud Practical Tips” series and focuses on version dependency issues, common Feign errors, and recommended version pairings, advising developers to follow official Spring Cloud compatibility charts and favor the latest Camden release with Spring Boot 1.4.x for enhanced features.