In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Original articles, welcome to reprint. Reprint please indicate: reproduced from IT Story Association, thank you!
Original link address: "Advanced articles" docker springboot,springcloud (8)
Introduced a lot of things about microservices, we have some understanding of microservices, but considering that there are more java, we have to say springboot and springcloud. In the world of java, they have such a close relationship with microservices, and students who have just come into contact with springboot and springcloud may have a kind of confusion, the relationship between springboot and microservices, the relationship between springcloud and microservices, the relationship between springboot and springcloud, help us asphalt ideas, get rid of the relationship, not on the back of the pot!
The mission of SpringBoot
SpringBoot is a project under spring. Why did it appear, and what is its mission? The most important thing is to simplify the development of spring, let's make it easy to develop spring, various xml configurations, various bean, service interfaces, implementation, caching, message queuing, without more than 3 spring configuration files, it is difficult to see that you are a spring project, there are too many troublesome configuration files.
Run java-jar * .jar independently
The original needs a web server, tomcat, and the code is released to the specified location of the server.
Embedded web server
Talk about the web server and the application package together, so that we do not have to pay attention to the details of a command to start.
Simplify configuration
Configure spring as automatically as possible, many of the configurations are fixed, and start is used to help us simplify the configuration of maven.
The relationship between quasi-production Application Monitoring SpringBoot and Micro Services
Java lubricant, springboot develops micro-service lubricant. Simplification of springboot, simplified development, simplified configuration, simplified deployment. Micro-services are characterized by lightweight, flexible, changeable and large quantity. Their features match very well, using springboot to develop micro-services just to deal with the characteristics of micro-services, springboot development and deployment process is faster, so springboot can be faster and easier to develop more services. If you are in the java language, it is right to use springboot to develop microservices. In fact, springboot is not much special, but the efficiency has been improved, the world martial arts can only be fast and unbroken!
The mission of SpringCloud
Simplify the distributed system of java. When you deploy java applications to multiple servers and provide distributed capabilities, the first problem you will encounter is session sharing on the web, load balancing before multiple services, and accessing different tomcat in nginx through rotational training. In the case of a stand-alone machine, it can be accessed directly through ip or port. What if it is distributed? We have to write a client with fault tolerance and constant load, and what to do with distributed transaction management. In fact, springcloud simplifies some of the problems we had before.
SpringCloud provides developers with rapid development of distributed services, unified configuration management, service registration, service invocation, service discovery, scheduler, load balancing, global locking, and distributed session.
A series of frameworks
Collection framework
Simplified java distributed system
Spring boot simplifies the development of java, and spring cloud simplifies the development of distributed systems (infrastructure development of distributed systems).
Encapsulation of springboot
Several service frameworks are combined and encapsulated in the style of springboot, based on a development tool of springboot.
Boot and cloudspringboot are intended to simplify, is a kind of development, configuration style springcloud is intended to simplify distribution, is a collection of functions, the style of unified cloud vs micro-service java cloud is intended to simplify the development of micro-services and the deployment of Java micro-service solutions
Focus on functionality and development
Provide multiple machines and deploy spring cloud applications, but the operation and maintenance spring cloud between them can't do it.
In fact, the final application developed by springcloud is docker image, and service orchestration tools are needed to restart the application. Core components of spring cloud
Netfilx eureka
Service Discovery component
Netfilx ribbon
Client load balancing component
Netfilx Hystrix
Dispatcher
Netfilx Zuul
Service gateway
Spring cloud config
Distributed configuration
Found that many of them are netfilx,netfilx is actually an American online film and television company. Tell me about his history. I like to look at his history in what language I learn. Once upon a time, there was a company called Blockbuster, which dominated the disc rental industry for many years. Some guy named Reed Hastings rented a disc there and got angry because he was hacked with a "big" overdue fee (about $40) for overdue return. Then he angrily went to the gym and found that the gym business model was so beautiful that no matter how much you went or how little you went, the membership fee could not be reduced by half a cent. Unfortunately, Hastings is a software engineer who is ready to change the world. He will do it whenever he wants to. What's more, he was already very rich at that time. So in his anger, he founded Netflix, which is also a business of renting CDs, with no overdue fees and membership. Thirteen years later, Netflix put Blockbuster into bankruptcy protection and got his revenge. This story tells us two things:
1. Customer service must be done well, do not kill the wool that should not be eaten, or you will force the sheep to become tigers.
two。 Engineers can't be annoyed.
Netfilx has opened up a lot of distributed solutions, but it is troublesome to use the target directly, and the threshold is relatively high. Spring cloud brought them here to integrate with spring, making him more integrated with spring. Introduce the components of spring cloud.
Mainly understand the principle, not in-depth introduction to spring cloud.
Netfilx eureka
Netfilx ribbon
Netfilx hystrix
Netflix zuul
Spring cloud config
PS: the micro services created by spring cloud+spring boot step by step are deployed on the service orchestration framework.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.