<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Traffic Control on Apache Dubbo</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/</link><description>Recent content in Traffic Control on Apache Dubbo</description><generator>Hugo</generator><language>en</language><atom:link href="https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/index.xml" rel="self" type="application/rss+xml"/><item><title>Sample Application Architecture</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/architecture/</guid><description>&lt;p>This task demonstrates the traffic control capabilities of Dubbo based on a simple online shopping mall microservice system.&lt;/p>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 All capabilities demonstrated in this example are implemented based on &lt;a href="https://deploy-preview-3199--dubbo.netlify.app/en/overview/what/core-features/traffic/introduction/">Dubbo Routing Rules&lt;/a>. For detailed information on how they work, please check the specifics.

&lt;/div>

&lt;p>The architecture diagram of the online mall is as follows:&lt;/p>
&lt;p>&lt;img alt="shop-arc" src="https://deploy-preview-3199--dubbo.netlify.app/imgs/v3/traffic/shop-arc.png">&lt;/p>
&lt;p>The system consists of 5 microservice applications:&lt;/p>
&lt;ul>
&lt;li>&lt;code>Frontend Shopping Mall Home&lt;/code>, which serves as the web interface interacting with users, calling &lt;code>User&lt;/code>, &lt;code>Detail&lt;/code>, &lt;code>Order&lt;/code>, etc., to provide user login, product display, and order management services.&lt;/li>
&lt;li>&lt;code>User Service&lt;/code>, responsible for user data management and identity verification.&lt;/li>
&lt;li>&lt;code>Order Service&lt;/code>, providing order creation and query services, relying on the &lt;code>Detail&lt;/code> service to validate product stock information.&lt;/li>
&lt;li>&lt;code>Detail Service&lt;/code>, displaying detailed product information and calling the &lt;code>Comment&lt;/code> service to show user comments on products.&lt;/li>
&lt;li>&lt;code>Comment Service&lt;/code>, managing user comments on products.&lt;/li>
&lt;/ul>
&lt;h2 id="deploying-the-mall-system">Deploying the Mall System&lt;/h2>
&lt;p>For convenience, we will deploy the entire system on a Kubernetes cluster. Execute the following command to complete the mall project deployment. The source code example is in &lt;a href="https://github.com/apache/dubbo-samples/tree/master/10-task/dubbo-samples-shop">dubbo-samples/task&lt;/a>.&lt;/p></description></item><item><title>Dynamically Adjust Service Timeout</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/timeout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/timeout/</guid><description>&lt;p>Dubbo provides the ability to dynamically adjust service timeout, allowing adjustments without restarting the application, which is very effective for temporarily resolving issues of invocation failure due to unstable upstream and downstream service dependencies.&lt;/p>
&lt;h2 id="before-you-start">Before You Start&lt;/h2>
&lt;ul>
&lt;li>Deploy the Shop mall project&lt;/li>
&lt;li>Deploy and open &lt;a href="https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/control-plane/architecture">Dubbo Admin&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="task-details">Task Details&lt;/h2>
&lt;p>The mall project provides user information management services through &lt;code>org.apache.dubbo.samples.UserService&lt;/code>. Access &lt;code>http://localhost:8080/&lt;/code>, enter any username and password, and click &lt;code>Login&lt;/code> to log into the system.&lt;/p></description></item><item><title>Improve Service Call Success Rate Through Retry</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/retry/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/retry/</guid><description>&lt;p>Retrying after an initial service call failure can effectively increase the overall call success rate. However, it is important to note that retries may lead to increased response times and higher system load. Additionally, retries are generally suitable for read-only services or write services that guarantee idempotency.&lt;/p>
&lt;h2 id="before-you-begin">Before You Begin&lt;/h2>
&lt;ul>
&lt;li>&lt;code>Deploy the Shop Mall Project&lt;/code>&lt;/li>
&lt;li>Deploy and open &lt;a href="https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/control-plane/architecture">Dubbo Admin&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="task-details">Task Details&lt;/h2>
&lt;p>After successfully logging into the mall project, the mall will automatically display the details of the currently logged-in user on the homepage.&lt;/p></description></item><item><title>Dynamically Enable Access Log to Track Service Calls</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/accesslog/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/accesslog/</guid><description>&lt;p>The access log can effectively record all service request information processed by a machine over a period of time, including request reception time, remote IP, request parameters, response results, etc. Dynamically enabling the access log at runtime is very helpful for problem troubleshooting.&lt;/p>
&lt;h2 id="before-you-start">Before You Start&lt;/h2>
&lt;ul>
&lt;li>&lt;code>Deploy the Shop Mall Project&lt;/code>&lt;/li>
&lt;li>Deploy and open &lt;a href="https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/control-plane/architecture">Dubbo Admin&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="task-details">Task Details&lt;/h2>
&lt;p>All user services of the mall are provided by the UserService of the &lt;code>User&lt;/code> application. Through this task, we enable the access log for one or more machines of the &lt;code>User&lt;/code> application to observe the overall access situation of user services.&lt;/p></description></item><item><title>Same Data Center/Region Priority</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/region/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/region/</guid><description>&lt;p>To ensure the overall high availability of services, we often adopt a strategy of deploying services across multiple availability zones (data centers). Through this redundancy/disaster recovery deployment model, we can still guarantee the overall availability of services when a region experiences a failure.&lt;/p>
&lt;p>When applications are deployed across multiple different data centers/regions, cross-region calls may occur between applications, which can increase response times and impact user experience. Same data center/region priority means that when an application calls a service, it prefers to call service providers in the same data center/region, avoiding network delays caused by cross-region calls and thereby reducing response times.&lt;/p></description></item><item><title>Conditional Traffic Routing</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/route/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/route/</guid><description>&lt;p>Routing is the core traffic control mechanism in Dubbo. Based on it, we can implement canary releases, proportional traffic forwarding, same-region prioritization, full-link grayscale, and other traffic strategies. The design and basic principles of the routing (Router) mechanism in Dubbo, along with several built-in routing rules.&lt;/p>
&lt;h2 id="common-traffic-control-scenarios">Common Traffic Control Scenarios&lt;/h2>
&lt;p>The built-in traffic strategies in Dubbo are very flexible, but there is also a certain understanding and usage cost. Therefore, we summarize some common usage scenarios and provide configuration methods:&lt;/p></description></item><item><title>Achieving Traffic Isolation Environments Through Tags (Canary Releases, Multiple Development Environments, etc.)</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/isolation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/isolation/</guid><description>&lt;p>Whether in daily development and testing environments or in pre-production environments, the need for traffic isolation environments often arises.&lt;/p>
&lt;ul>
&lt;li>In daily development, to avoid mutual interference during testing, we need to set up multiple independent testing environments, but building physical clusters is very costly and not flexible enough.&lt;/li>
&lt;li>During production releases, to ensure that the new version is fully validated, we need to set up a completely isolated online canary environment to deploy new version services. The online canary environment can fully simulate production runtime conditions, but only a fixed amount of traffic with specific tags will flow to the canary environment, minimizing the risk of online changes while thoroughly validating the new version.&lt;/li>
&lt;/ul>
&lt;p>Using Dubbo&amp;rsquo;s tag routing capability allows for very flexible traffic isolation. It can separately isolate a specific application in a cluster or an entire microservice cluster; it can statically mark the isolation environment during deployment or dynamically isolate part of the machine environment through rules during runtime.&lt;/p></description></item><item><title>Guiding Traffic Distribution Based on Request Parameters</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/arguments/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/arguments/</guid><description>&lt;p>Forwarding traffic based on request parameter values is a very flexible and practical traffic control strategy. For instance, in microservice practices, routing traffic based on parameters (such as user ID) allows a portion of user requests to be directed to the latest product version to validate the stability of the new version and gather user feedback on the product experience, which is a commonly used effective gray mechanism in production practices.&lt;/p></description></item><item><title>Proportional Traffic Forwarding Based on Weight Values</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/weight/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/weight/</guid><description>&lt;p>Dubbo provides a weight-based load balancing algorithm that allows for proportional traffic distribution: machines with higher weight receive more request traffic, while those with lower weight receive relatively less.&lt;/p>
&lt;p>Based on a weight-based traffic scheduling algorithm, dynamically adjusting the weight of a single machine or a group of machines via rules can change the distribution of request traffic at runtime, enabling dynamic proportional traffic routing, which is useful for several typical scenarios.&lt;/p></description></item><item><title>Service Downgrading for Weak Dependencies Before Major Promotions</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/mock/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/mock/</guid><description>&lt;p>Due to the distributed nature of microservice systems, a service often needs to rely on many external services to implement a certain function. Therefore, the stability of a service depends not only on itself but also on the stability of all external dependencies. We can categorize these dependencies based on their importance into strong and weak dependencies: strong dependencies are those that must ensure stability at all costs, as the current service will also be unavailable if they are not; weak dependencies refer to those dependencies that allow the current service to function normally even when they are unavailable, as their unavailability only affects part of the functionality.&lt;/p></description></item><item><title>Point-to-point Traffic Redirection to a Single Machine (e.g., Troubleshooting Issues)</title><link>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/host/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3199--dubbo.netlify.app/en/overview/mannual/java-sdk/tasks/traffic-management/host/</guid><description>&lt;p>Automatic address discovery and load balancing mechanisms have many advantages; they make it possible to build scalable distributed microservices systems. However, this dynamic traffic allocation also brings a lot of complexity. A typical issue is that we can no longer predict which provider machine a request will hit. Yet, being able to expect or control requests to a specific provider machine can be very useful in certain scenarios. For instance, when developers troubleshoot complex issues in testing or production environments, reliably reproducing issues on a specific machine can greatly aid in final problem resolution.&lt;/p></description></item></channel></rss>