Springcloud Learning--routing gateways

Source: Internet
Author: User

In the micro-service architecture, several basic micro-services are required, including service registration and discovery, service consumption, load balancing, circuit breakers, I-can routing, configuration management, and so on, by these several basic components to work together to build a simple micro-service system.

-zuul Introduction

Zuul is Netflix's open source MicroServices gateway, which he can use with components such as Eureka,ribbon,hystrix. The core of the Zuul component is a series of filters that can perform the following functions:

1, identity authentication and security: Identify the authentication requirements for each resource and reject those that do not match

2, review and monitoring:

3, dynamic routing: Dynamically routing requests to different back-end clusters

4, Load distribution: Allocate the corresponding capacity for each type of load and discard requests exceeding the qualified value

5, static response processing: The edge position responds to avoid forwarding to the internal cluster

6 Multi-Zone resiliency: Request routing across domain AWS region for ELB (elasticload balancing) Use diversification

Spring Cloud consolidates and enhances the Zuul. Currently, Zuul uses the Apache HTTP Client as the default.

Zuul and Eureka are used together, Zuul need to register to Eureka,

Pom files need to add dependencies:

    <Dependencies>        <Dependency>            <groupId>Org.springframework.cloud</groupId>            <Artifactid>Spring-cloud-starter-netflix-eureka-client</Artifactid>        </Dependency>        <Dependency>            <groupId>Org.springframework.boot</groupId>            <Artifactid>Spring-boot-starter-web</Artifactid>        </Dependency>        <Dependency>            <groupId>Org.springframework.cloud</groupId>            <Artifactid>Spring-cloud-starter-netflix-zuul</Artifactid>        </Dependency>    </Dependencies>

In its entrance Applicaton class plus annotation @enablezuulproxy, it is added by default @enablecircuitbreaker and @enablediscoveryclient, So we just need to add annotated annotations @enablezuulproxy

Springcloud Learning--routing gateways

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.