This article provides a comprehensive overview of the Spring Cloud ecosystem, detailing its six-layer component architecture, strict version compatibility rules, end-to-end request flow, core abstraction interfaces, recommended project structure, common configuration pitfalls, and a structured learning path with interview questions.
This comprehensive guide compares Dubbo, gRPC, and Feign across eight critical dimensions including protocols, serialization, performance, cross-language support, service discovery, circuit breaking, streaming, and hybrid architecture coordination, with detailed interview questions and answers for each.
This article compares Dubbo, gRPC, and Feign across circuit breaking, streaming, contract management, learning curves, and real-world scenarios, providing a decision matrix and a Spring Cloud Alibaba hybrid architecture where all three coexist for external HTTP, internal high-frequency Java, and cross-language algorithm services.
The author refactors an old Spring Cloud project by removing Feign, replacing @FeignClient with Spring Boot 4.x’s native @HttpExchange and @ImportHttpServices, and demonstrates that Spring’s built‑in HTTP Service Client provides the same declarative convenience with less boilerplate, while still supporting custom configuration, error handling, and reactive use cases.
Spring 7 removes Feign as the default for declarative HTTP calls, introducing @HttpExchange and @ImportHttpServices so developers can use spring‑web’s @GetExchange with RestClient or WebClient, while keeping configuration and security aligned with Spring Boot 4 and Security 7.
Spring 7 doesn’t remove Feign from the classpath but officially discourages its use, labeling OpenFeign as feature‑complete and recommending the new Spring Framework HTTP Service Client, with a detailed comparison, migration steps, and guidance on when Feign may still be viable.
This article analyzes why Spring Framework introduced the native @HttpExchange HTTP client to replace OpenFeign, comparing their architectures, dependencies, proxy mechanisms, performance benchmarks, and offering migration guidance for developers deciding between the two declarative HTTP solutions.
The article analyzes Spring Framework’s new native HTTP Interface (@HttpExchange), comparing it with OpenFeign in terms of architecture, dependency management, performance, and suitability for reactive programming, and provides migration guidance and practical code examples.
This article shares production-hardened patterns for multi-tenant SaaS using Spring Boot, covering isolation mode selection, ThreadLocal-based context propagation, MyBatis-Plus SQL interception for automatic tenant_id injection, Feign and async thread propagation, HikariCP tuning, composite indexing, cursor pagination, and real-world pitfalls like interceptor ordering, transaction-bound data source switching, and ThreadLocal leakage.
Feign may be set to a 3‑second timeout, but in Spring Cloud versions before 2020.0 the call is handled by Ribbon, whose default 5‑second read timeout and a single retry to another instance double the wait, producing a consistent 10‑second timeout; the article details this behavior and shows how to configure Ribbon, upgrade Spring Cloud, or use a circuit‑breaker to enforce the intended timeout.
An online education platform needs to batch‑download course materials from self‑hosted courses, partner APIs, and archived PDFs; the article details a Spring Boot service that aggregates URLs, signs them, distinguishes direct downloads, submits an asynchronous PDF conversion and ZIP packaging task via Feign, and returns a task ID for front‑end polling.
The article demonstrates how to use Spring Boot and MyBatis-Plus to record user-product visit logs via an atomic INSERT ON DUPLICATE KEY UPDATE upsert, while isolating any remote-call failures through layered try-catch blocks so that logging never disrupts the main product-detail response.
This guide walks through configuring comprehensive logging in Spring Boot 3.5 for eight common scenarios—including JPA SQL, transaction flow, JDBC operations, RestTemplate, RestClient, WebClient, controller requests, and Feign calls—providing concrete code samples, YAML settings, and sample output to help developers troubleshoot and monitor applications effectively.
Even though a gateway authenticates tokens and forwards user info, microservices must perform a second authorization check to enforce business rules, protect against internal threats, and uphold a zero‑trust security model, as explained with concrete examples and code.
This article walks through adding Alibaba Sentinel to a Spring Cloud microservice suite to protect against service outages, traffic spikes, and slow calls by configuring rate limiting, circuit breaking, and fallback mechanisms across user, order, and gateway services, with full Docker‑compose setup and testing steps.
This article walks through why Feign is needed for microservice communication, compares it with RestTemplate and WebClient, shows step‑by‑step setup, core configuration, advanced features such as interceptors, custom encoders/decoders, retry and circuit‑breaker integration, performance tuning, production‑grade best practices, FAQs and a concise checklist.
The article explains why passing tokens between microservices is a poor design, illustrates the problems with mixed internal‑external APIs, and presents three practical alternatives—explicit parameter passing, centralized authentication via an API gateway with Spring Cloud Gateway and Feign, and a shared auth module with K8s integration—detailing their pros, cons, and implementation steps.
This article explains how to connect Spring Boot to external services by choosing the appropriate HTTP client (RestTemplate, Feign, WebClient), configuring beans, implementing service methods, and applying various data‑synchronization techniques such as full sync, UPSERT, incremental sync, webhook callbacks, and message‑queue based replication.
This article explains how to invoke external services from a Spring Boot application using three approaches—raw HttpClient, Spring's RestTemplate, and Feign—providing code examples, configuration steps, and tips for handling headers and tokens.
This article walks through integrating Spring Boot with external APIs, comparing RestTemplate, Feign, and WebClient, and presents three data‑synchronization approaches—full, incremental, and real‑time—detailing step‑by‑step configurations, code examples, and the trade‑offs of each method.
This guide walks through integrating Spring Boot with external services using RestTemplate, Feign, and WebClient, then compares full, incremental, and real‑time data‑synchronization approaches, providing step‑by‑step code examples, configuration details, and practical trade‑off analysis.
The article explains that the initial Feign request is slow because Ribbon lazily creates its client and fetches the service list at first use, and shows how enabling Ribbon’s eager‑load mode pre‑warms the client to eliminate the delay.
This comprehensive guide walks through OpenFeign fundamentals, differences from Feign, environment setup, service provider and consumer implementation, various parameter passing techniques, timeout handling, logging, HTTP client replacement, GZIP compression, and Sentinel-based circuit breaking, all illustrated with code snippets and diagrams.
Spring Cloud Feign simplifies HTTP communication between microservices by allowing developers to declare REST clients via interfaces and annotations, eliminating boilerplate code, and integrating seamlessly with Spring MVC, Ribbon load balancing, and Resilience4j circuit breaking, with detailed setup, configuration, and best‑practice examples.
The article examines coupling problems caused by multiple backend controllers and third‑party push interfaces, proposes a dedicated TPS microservice that centralizes third‑party calls via Feign, outlines its implementation with Java code, enums, factories, and demonstrates how this reduces duplication and improves maintainability.
This article explains how to solve interleaved log lines in multi‑threaded pods by using a TraceId stored in SLF4J MDC, propagating it via HTTP headers, adapting thread pools and Spring task decorators, and integrating SkyWalking to enrich Logback patterns for end‑to‑end request tracing.
This article explains why authentication loops occur when external user tokens and internal service tokens are handled together in Spring Security, and provides a step‑by‑step solution using distinct headers, custom filters, and Feign interceptors to break the cycle.
This article explains how to solve interleaved log lines in multi‑threaded pods by propagating a unique TraceId via HTTP headers and SLF4J MDC, integrating the approach with Spring filters, Feign interceptors, thread‑pool adapters, and SkyWalking for end‑to‑end tracing.
This article demonstrates three methods for invoking external services in Spring Boot applications—using raw HttpClient, the RestTemplate utility, and Feign clients—providing code examples, configuration steps, and tips for handling headers and tokens to simplify integration without Dubbo.
This article demonstrates how to externalize Feign client settings—such as base URL, connection and read timeouts, and authentication—into a database, create a factory that builds clients with the latest configuration, and use Spring Cloud OpenFeign together with Actuator to refresh these settings at runtime, complete with full code examples and screenshots.
The article critiques token pass‑through for microservice authentication, explains why internal APIs should be stateless and receive explicit parameters like userId, and compares unified gateway‑based approaches (Feign, Dubbo, Spring Boot) with non‑unified methods, including Kubernetes integration and practical pros and cons.
This article critiques the common practice of token passthrough for microservice authentication, explains why it hampers design and code reuse, and compares several internal call strategies—including Feign, Dubbo, Spring Boot Web with Dubbo, and K8s‑integrated approaches—highlighting their pros, cons, and best‑practice recommendations.
The article discusses why token transmission is discouraged in microservice authentication, proposes passing explicit parameters, compares Feign, Dubbo, and Spring Boot Web internal call approaches, and explains how to integrate these patterns with a unified gateway, regular authentication modules, and Kubernetes Ingress for scalable backend architectures.
This article explains how to replace numerous static Feign client interfaces with a single dynamic Feign client that can invoke any microservice endpoint at runtime by specifying the service name, URL, and parameters, simplifying code and reducing boilerplate in Spring Cloud applications.
This article introduces the six main types of interceptors in SpringBoot—Filter, HandlerInterceptor, AOP, RestTemplate, Feign, and WebFilter—explaining their typical use‑cases, implementation details, common pitfalls, and best‑practice ordering to help developers choose the right tool for each scenario.
This article explores the hierarchy of Spring Boot interception mechanisms—Filter, HandlerInterceptor, AOP, RestTemplate, Feign, and WebFilter—detailing their typical use cases, implementation code, pitfalls, and best‑practice ordering, while providing practical tips and performance monitoring advice for robust backend development.
This article compares Feign and Spring 6's @HttpExchange for remote service calls, walks through practical examples—including interface definition, proxy creation, various client options, testing, reactive returns, custom argument resolvers, and error handling—while providing complete code snippets for Spring Boot 3.4.2.
This article analyzes the high coupling caused by multiple backend controllers and third‑party push interfaces, then proposes a dedicated TPS microservice that encapsulates third‑party calls via Feign, standardizes parameters, and reduces code duplication for frontend and backend systems.
This article analyzes the coupling problems caused by multiple controller calls and third‑party push interfaces, proposes a TPS microservice to centralize third‑party interactions, demonstrates Java Feign interfaces and enum‑based routing, and shows how backend and frontend can achieve low‑coupling architecture while reducing code duplication.
The article explains how high coupling caused by multiple front‑end controllers and repetitive back‑end push‑service code can be eliminated by introducing a dedicated TPS microservice that encapsulates third‑party integrations and exposes a unified Feign interface for all business systems.
This article describes how to build a lightweight service registry using Eureka Server that also acts as a client, enabling a task dispatcher to discover and load‑balance task executor instances without deploying a separate registry, including Maven dependencies, Spring annotations, Feign client definitions, and troubleshooting steps.
This article explains the role of Hystrix as a circuit‑breaker in Spring Cloud microservices, describes why service failures can cascade, and provides a detailed, hands‑on implementation—including Maven dependencies, annotations, fallback methods, configuration of circuit thresholds, and integration with Ribbon and Feign – complete with code snippets and test steps.
This article walks through the background of Spring Cloud's Feign client, explains its core concepts, shows step‑by‑step project setup with Eureka services, demonstrates remote calls and file upload extensions using Feign‑Form, and concludes with a functional microservice example.
This article explains how to streamline OpenFeign usage during local development by creating a custom ImportBeanDefinitionRegistrar that registers Feign clients with configurable URLs, avoiding manual URL changes in annotations and ensuring seamless switching between local and production environments.
This article compares Dubbo and Feign, outlining their architectures, features, and suitability for different microservice scenarios, and provides practical guidance on selecting the appropriate RPC framework based on performance, reliability, and development efficiency requirements.
This article explains how to generate a unique TraceId, propagate it via HTTP headers and SLF4J MDC, integrate the mechanism with Logback, Feign clients, thread pools, and SkyWalking, and details the underlying MDC and Logback placeholder implementations for reliable log tracing in Java backend applications.
This article demonstrates three methods for invoking external services in a Spring Boot application—using raw HttpClient, the RestTemplate utility, and Feign clients—providing code examples, configuration steps, and tips for handling headers and tokens.
This article explains how Feign performs remote calls using a registration center and Ribbon for load balancing, details Ribbon's internal mechanisms such as RibbonClientConfiguration, ZoneAwareLoadBalancer, various load‑balancing rules, and demonstrates how to enable eager‑load mode to reduce first‑call latency.
The article investigates a recurring SocketTimeoutException caused by a circular dependency between two Spring Cloud services, explains the deadlock mechanism, demonstrates how removing the circular call resolves the issue, and provides verification steps with code, JMeter load testing, and thread‑dump analysis.
This article reviews ten practical methods for invoking third-party HTTP services in Spring Boot 3.3, covering plain JDK URL, HttpClient, Apache HttpClient, OkHttp, RestTemplate, WebClient, RestClient, Http Interface, OpenFeign, and Gateway proxy, each with code samples and key advantages.
This article demonstrates three approaches for invoking external services in Spring Boot applications—using raw HttpClient, the RestTemplate utility, and Feign clients—providing code samples, configuration steps, and tips for handling headers and tokens.
This article explains how Feign uses Ribbon for remote calls, details Ribbon's load‑balancing mechanisms, enumerates built‑in strategies, and demonstrates how to enable eager‑load mode to pre‑warm clients and avoid first‑request latency in Java microservice environments.
This article demonstrates three practical approaches for invoking external services in a Spring Boot application—using a raw HttpClient, the RestTemplate utility, and the Feign declarative client—complete with code examples, configuration steps, and tips for handling headers and tokens.
This comprehensive tutorial walks you through OpenFeign—its relationship to Feign, environment setup, service provider and consumer creation, various parameter passing methods, timeout handling, logging, HTTP client replacement, GZIP compression, and Sentinel-based circuit breaking—providing practical code examples and configuration snippets for Spring Cloud microservices.
The article explains that the initial Feign request is slow because Ribbon lazily creates its load‑balancer client and fetches the service list from the registry, and shows how enabling Ribbon's eager‑load mode pre‑warms the client to eliminate the delay.
The article analyzes coupling problems caused by multiple backend controllers and third‑party push interfaces, proposes a dedicated TPS microservice to encapsulate third‑party calls, demonstrates Feign integration with Java code examples, and concludes with a summary of benefits and further considerations.
The article explains the drawbacks of token pass‑through in microservice authentication, advocates explicit parameter passing, outlines unified gateway authentication with Feign or Dubbo, explores Kubernetes‑integrated deployment options, and concludes with a promotional invitation to a technical community.
The article analyzes high coupling problems caused by multiple controller calls and third‑party integrations in a Java settlement backend, and proposes a dedicated TPS microservice with unified Feign interfaces, enum‑based routing, and factory patterns to decouple frontend and backend logic while providing implementation examples and diagrams.
This article examines the pitfalls of token pass‑through authentication in microservices, proposes explicit userId parameter passing, compares unified auth approaches using Spring Cloud Gateway with Feign or Dubbo, and explores non‑unified alternatives, including K8s Ingress integration and practical code examples.
The article compares several microservice internal‑call strategies—including token‑pass-through, Feign, Dubbo, Spring Boot Web with Dubbo, and K8s‑integrated approaches—explaining their advantages, drawbacks, and how to implement unified authentication while keeping APIs stateless and reusable.
The article analyzes front‑end and back‑end coupling problems caused by multiple controller calls and third‑party push integrations, and proposes a dedicated TPS microservice that centralizes third‑party interactions via a Feign interface to reduce duplication and simplify future changes.
The article explains why passing tokens between microservices is a poor design, proposes exposing explicit userId parameters, describes unified authentication via an API gateway with Feign, Dubbo or Spring Boot Web implementations, compares their pros and cons, and shows how to integrate these patterns with Kubernetes and internal API path rules.
The article critiques token pass‑through for microservice authentication, explains why internal APIs should stay stateless, and presents unified authorization patterns using Spring Cloud Gateway with Feign, Dubbo, or a gateway‑less design, plus Kubernetes integration and trade‑offs.
This article demonstrates how to invoke external services from a Spring Boot application by using raw HttpClient, the RestTemplate utility, and Feign client, providing complete code examples, configuration steps, and tips for handling headers and tokens.
This article explains how to integrate feign-reactor with Spring Boot 2.7, covering OpenFeign features, reactive client setup, code examples, timeout configuration, and programmatic usage to enhance microservice communication.
This article explains the principles of Feign, demonstrates how to set connection and read timeout values using Feign.Builder, method parameters, Options beans, configuration files, Ribbon, and Hystrix, and clarifies the precedence rules among these approaches in both standalone and Spring Cloud contexts.
This article explains how to configure Feign's timeout settings in various scenarios—including standalone usage, Spring Cloud integration, Ribbon, and Hystrix—detailing builder options, method‑level parameters, bean declarations, and configuration‑file approaches while highlighting priority rules and potential pitfalls.
Learn how to integrate external HTTP services in Spring Boot by using raw HttpClient, the RestTemplate utility, and declarative Feign clients, with detailed code examples, token handling, and configuration tips for each approach.
This guide explains how to improve Spring Cloud's low default performance by configuring and tuning components such as the servlet container (switching to Undertow), Feign, Hystrix, Ribbon, and Zuul, providing detailed code snippets and parameter recommendations for high‑concurrency scenarios.
This article explains how to achieve graceful service publishing using Nacos as a registration center in a Spring Boot microservice architecture, covering environment setup, provider startup and shutdown, client-side load‑balancing with Ribbon, and configuration tweaks for both online and offline scenarios.
This article explains how Feign relies on Ribbon for remote calls, details Ribbon's load‑balancing mechanisms, various balancing rules, and demonstrates how enabling Ribbon's eager‑load mode can pre‑warm clients to avoid the latency of the first request.
This article explains how to restrict certain microservice interfaces to internal calls only by using two approaches—gateway with whitelist and gateway combined with AOP—detailing the implementation steps, code examples, and trade‑offs in a Spring Cloud environment.
This article explains how to invoke external services from a Spring Boot application using three approaches—raw HttpClient requests, Spring's RestTemplate utilities, and Feign clients—providing code examples, configuration steps, and tips for handling headers and tokens.
This article demonstrates three practical approaches—native HttpClient, Spring's RestTemplate, and Feign client—to invoke external services from a Spring Boot application, providing code examples, configuration details, and tips for handling authentication tokens.
This article explains how to invoke external services from a Spring Boot application using three approaches—raw HttpClient, Spring's RestTemplate, and Feign client—providing detailed code examples, configuration steps, and tips for handling headers and tokens.
This article explains three methods for invoking external services in Spring Boot applications—using a raw HttpClient, the RestTemplate utility, and Feign clients—providing code examples, configuration steps, and tips for handling headers and tokens.
This article provides a comprehensive overview of Spring Cloud, covering its core components, microservice concepts, service discovery, load balancing, circuit breaking, configuration management, and practical interview questions with code examples such as Eureka, Feign, Ribbon, and Hystrix.
This article provides a comprehensive overview of Spring Cloud fundamentals, including core components, microservice concepts, service discovery, load balancing, circuit breaking, Eureka vs Zookeeper, Feign, Ribbon, Config, Bus, and Gateway, together with typical interview questions and practical code snippets.
This article explains how to invoke external services from a Spring Boot application using three approaches—raw HttpClient, RestTemplate, and Feign—providing code examples, configuration steps, and tips for handling headers and tokens to ensure successful API communication.
This article provides a comprehensive overview of Spring Cloud fundamentals, including microservice architecture, core components, service registration, communication methods, circuit breaking, load balancing, and configuration management, presented as a collection of high‑frequency interview questions and answers.
This article provides a detailed tutorial on OpenFeign, covering its purpose, differences from Feign, environment setup, service provider and consumer creation, various parameter passing methods, timeout handling, logging configuration, HTTP client replacement, GZIP compression, and Sentinel-based circuit breaking, while also including practical code examples and configuration snippets.
This article introduces Spring Cloud and explains its five essential components—Eureka service registry, Feign declarative client, Ribbon load balancer, Hystrix circuit breaker, and Zuul API gateway—illustrating how they simplify distributed system development with Spring Boot style one‑click deployment.
This article explains how to create a custom @FeignRetry annotation that leverages Spring Retry to provide configurable, per‑method retry policies for Feign client calls, including code examples of the annotation, aspect implementation, and usage patterns.
This article explains how to create a reusable dynamic Feign client in Java, replacing multiple static Feign interfaces with a generic service that can invoke any microservice endpoint via configurable URLs, and provides full code examples and usage instructions.
This article explains how to create a dynamic Feign client in Spring Cloud by defining a generic service interface, a dynamic client wrapper, and a factory that builds Feign instances at runtime, allowing flexible GET and POST calls to any microservice without writing repetitive client interfaces.
This article explains how to replace numerous static Feign client interfaces with a single dynamic Feign client in Spring, showing the generic service definition, a client factory, and usage examples that streamline inter‑service HTTP calls while keeping code reusable and maintainable.
This article demonstrates how to configure a Spring Cloud Eureka server and multiple client applications, covering dependency inclusion, YAML configuration, service startup, testing, and three consumption methods—DiscoveryClient, Ribbon‑enabled RestTemplate, and Feign—complete with runnable code examples.
This article provides a detailed overview of Spring Cloud fundamentals, including microservice architecture, core components, service discovery, load balancing, circuit breaking with Hystrix, differences between Eureka and Zookeeper, and practical usage of Ribbon, Feign, and Spring Cloud Bus, aimed at helping developers prepare for interview questions.
This article outlines common Feign issues such as 400 Bad Request, illegal character errors, Chinese garbled text, multiple @RequestBody parameters, and read timeouts, and provides clear code‑based solutions and configuration tips for each problem.
The article explains how a Business Monitoring Platform isolates user‑defined Groovy scripts by assigning each script its own custom Java ClassLoader that loads uploaded JARs, breaking parent‑delegation, preventing class conflicts, reducing Metaspace growth, and dynamically creating Feign and Dubbo beans for safe, independent execution.
This tutorial demonstrates how to implement inter‑service communication in Spring Cloud using RestTemplate and Feign, covering project setup, bean configuration, three RestTemplate invocation patterns, load‑balancing with Ribbon, and switching strategies via code or configuration files.
The article explains why Dubbo’s RPC model, with its serialization limits, single‑connection design, and high memory consumption, is ill‑suited for transmitting files, and compares it with HTTP and Feign approaches that handle large file uploads more efficiently, while also providing practical code examples.
The article explains why Dubbo's RPC design and single‑connection model make it inefficient for transmitting files, compares the memory‑heavy approach of sending byte arrays with the streaming nature of HTTP, and shows how Feign can upload files but still suffers from in‑memory buffering.
This article explains Spring Cloud's role in building distributed micro‑service systems, illustrates an e‑commerce order‑payment scenario, and details the core components Eureka, Feign, Ribbon, Hystrix, and Zuul, showing how they work together for service registration, discovery, load balancing, fault tolerance, and API routing.
This article explains why Dubbo’s RPC model and single‑connection design make it unsuitable for transmitting large files, compares it with HTTP streaming, and shows how Feign’s encoder still loads whole payloads into memory, recommending direct client uploads instead.
This tutorial walks you through OpenFeign in Spring Cloud, explaining its purpose, differences from Feign, setup steps, various parameter passing methods, timeout handling, logging enhancement, HTTP client replacement, GZIP compression, and circuit‑breaker integration with Sentinel, all illustrated with code snippets and diagrams.
This tutorial walks through the fundamentals of microservices, setting up a Spring Cloud project with Eureka service registry, configuring server and client modules, implementing load‑balanced calls using Ribbon and Feign, and achieving high availability with multiple Eureka instances, all illustrated with code snippets and configuration files.
This article explains how Feign (and OpenFeign) simplifies remote service calls in Spring Cloud by scanning @FeignClient interfaces, generating dynamic proxies, parsing MVC annotations, integrating with Ribbon for load balancing, and handling request/response processing, illustrated with step‑by‑step code examples and diagrams.
This article explains how PolarisMesh, Tencent's open‑source service discovery and governance platform, solves service address management and fault tolerance challenges in a Spring Boot microservice ecosystem, and provides step‑by‑step instructions—including Maven dependency, provider and consumer configuration, and sample code—to quickly integrate PolarisMesh via Feign.
This article provides a comprehensive tutorial on creating Spring Cloud microservices, covering the fundamentals of microservice architecture, project initialization with Maven and IntelliJ, configuring Eureka registration servers, implementing service providers and consumers, using Ribbon and Feign for load‑balanced calls, and setting up high‑availability Eureka clusters.