MicroServices Architecture Springcloud (i) Introduction to components and concepts

Source: Internet
Author: User
Tags zookeeper

One: What is microservices (microservice)

MicroServices English Name Microservice,microservice schema mode is to organize the entire Web application into a series of small Web services. These small Web services can be compiled and deployed independently, and communicate with each other through their exposed API interfaces. They work together to provide functionality to the user as a whole, but can be expanded independently.

Features or usage scenarios required by the MicroServices architecture

    1:我们把整个系统根据业务拆分成几个子系统。

2: Each subsystem can deploy multiple applications, using load balancing across multiple applications.

3: A service registry is required, all services are registered in the registry, and load balancing is achieved by using a certain policy through the services registered in the registry.

4: All clients access the backend service through the same gateway address, through the routing configuration, the gateway to determine which service a URL request is handled by. Load balancing is also used when the request is forwarded to the service.

5: Services sometimes require mutual access. For example, there is a user module, the other services in the processing of some business, to obtain user data of customer service.

6: A circuit breaker is required to handle time-outs and errors in service invocation, preventing the overall system from being paralysed due to one of the service's problems.

7: A monitoring function is also required to monitor the time spent on each service invocation.

The current mainstream micro-service framework: Dubbo, Springcloud, Thrift, Hessian, and so on, most of the domestic small and medium-sized enterprises are Dubbo,springcloud estimates are very few, perhaps some development students have not heard of.

II: Springcloud Project Introduction

Springcloud is a springboot-based framework for implementing microservices. He provides components such as configuration management, service discovery, circuit breakers, intelligent routing, micro-proxies, control buses, global locks, decision-making campaigns, distributed sessions, and cluster state management required for micro-service development. The most important thing is that

Working with the Spring boot framework will make it very convenient for you to develop a cloud service for your microservices architecture.

Springboot is designed to streamline the creation of product-level Spring applications and services, simplifies configuration files, uses embedded Web servers, and includes many out-of-the-box microservices capabilities

Related Component architecture diagram

Spring Cloud sub-projects include:

Spring Cloud Config: The Configuration Management Development Kit lets you put your configuration on a remote server that currently supports local storage, git, and subversion.

Spring Cloud Bus: event, message bus, used to propagate state changes in a cluster (for example, configuration change events), which can be combined with Spring Cloud Config for hot deployment.

Spring Cloud Netflix: Development kits for a variety of Netflix components, including Eureka, Hystrix, Zuul, Archaius, and more.

Netflix Eureka: Load balancing in the cloud, a REST-based service for locating services to enable load balancing in the cloud and failover of middle-tier servers.

Netflix hystrix: Fault-tolerant management tools designed to provide greater fault tolerance for latency and failures by controlling the nodes of services and third-party libraries.

Netflix Zuul: Edge Service tool that provides dynamic routing, monitoring, resiliency, security and other edge services.

Netflix Archaius: The Configuration Management API, which includes a series of configuration management APIs that provide dynamic typed properties, thread-safe configuration operations, polling frameworks, callback mechanisms, and more.

Spring Cloud for Cloud Foundry: The OAUTH2 Protocol binding service to Cloudfoundry,cloudfoundry is the open source PAAs cloud platform that VMware has launched.

Spring Cloud Sleuth: A Log collection toolkit that encapsulates Dapper,zipkin and htrace operations.

Spring Cloud Data Flow: The Big data manipulation tool that operates data streams from the command line.

Spring Cloud Security: Safety Toolkit, which adds security controls to your application, mainly refers to OAuth2.

Spring Cloud Consul: Encapsulates the Consul operation, Consul is a service discovery and configuration tool that can be seamlessly integrated with Docker containers.

Spring Cloud Zookeeper: A toolkit for manipulating Zookeeper for service registration and discovery using Zookeeper methods.

Spring Cloud Stream: A data flow Operation development package that encapsulates a send receive message with Redis,rabbit, Kafka, and so on.

Spring Cloud CLI: Based on the spring Boot CLI, allows you to quickly build cloud components in a command-line manner.

Springcloud Features

   1:约定优于配置

2: Off-the-box, quick Start

3: Suitable for various environments

4: Lightweight Components

5: Rich component support, full function

Three: Springboot understand

Spring Boot让我们的Spring应用变的更轻量化。比如:你可以仅仅依靠一个Java类来运行一个Spring引用。你也可以打包你的应用为jar并通过使用java -jar来运行你的Spring Web应用。

Since Springcloud relies on springboot, it is necessary to understand the springboot before learning the Springcloud framework.

Key Benefits of Springboot:

1: Get started faster for all spring developers

2: Out-of-the-box with a variety of default configurations to simplify project configuration

3: Built-in container simplifies web projects

4: No redundant code generation and XML configuration requirements

Through a HelloWorld to understand the following address: http://start.spring.io/

The schema code is as follows:

MicroServices Architecture Springcloud (i) Introduction to components and concepts

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.