SpringCloud: Build a complete micro-service architecture system based on the Spring Cloud netflix family bucket
Overall architecture
Service Planning
Registration Services
Example
Host
port
Explain
Access Address
EUREKASERVER
EurekaServer1
ek1.com
9001
eureka Service 1
http://ek1.com:9001
EUREKASERVER
EurekaServer2
ek2.com
9002
eureka Service 2
http://ek2.com:9002
SCSERVER
sc-server1
scServer1
8001
Remote Service 1
Action: http://scserver1:80 ...
Posted by Josien on Fri, 03 Dec 2021 17:01:56 -0800
Use it out of the box and look at other people's microservice permission solution. It's called an elegant solution
Pre knowledge
We will use Nacos as the registration center, Gateway as the Gateway, and the micro service permission solution provided by SA token. This solution is based on the previous solution
Application Architecture
The idea is similar to the previous scheme. The authentication service is responsible for login processing, the ga ...
Posted by treppers on Wed, 01 Dec 2021 20:22:18 -0800
Multithreaded learning four
Navigation
1,Multithreaded learning one
6. No lock of shared model
In this chapter, we will implement concurrency control through non blocking optimistic locks
6.1 problem raising
There are the following requirements to ensure the thread safety of the account.withdraw withdrawal method Test5.java
public class Test5 {
public static vo ...
Posted by BigMonkey on Tue, 30 Nov 2021 15:56:11 -0800
Application practice of Gateway
Gateway overview
In essence, the gateway should provide an access to various services, and provide services to receive and forward all internal and external client calls, as well as authority authentication, flow restriction control and so on. Spring Cloud Gateway is a gateway component developed by spring company based on Spring 5.0, Spring B ...
Posted by matscott on Tue, 30 Nov 2021 07:05:57 -0800
This paper explains the principle and implementation of consistent hash
Why do I need a consistent hashFirst, what is hashHash, generally translated as hash, or transliterated as hash, is to transform an input of any length (also known as pre mapping pre image) into a fixed length output through hash algorithm, and the output is the hash value. This transformation is a compression mapping, that is, the hash value s ...
Posted by smithmr8 on Mon, 29 Nov 2021 17:53:20 -0800
Echo Framework: Turn on TLS/SSL
introduceWith a complete example, turning on TLS/SSL in the Echo framework is what we call https.We will use rk-boot To start the microservice for the Echo framework.Visit the following address for the complete tutorial:https://rkdocs.netlify.app/cnGenerate Self-Signed CertificateUsers can purchase certificates from major cloud vendors or use t ...
Posted by vidago on Mon, 29 Nov 2021 14:49:46 -0800
demo demonstration of spring clound Alibaba learning 02 Nacos service registration and discovery
1, Create local project
Because microservice is an aggregate project, we need to create a blank folder locally as the local project workspace. All project modules are in the workspace. Remember that it must be a blank folder without anything in it or any Chinese on the pathOpen idea, select file - > open, go in and select the newly crea ...
Posted by fernado1283 on Mon, 29 Nov 2021 05:57:48 -0800
Installing the nacos image in Mac M1
For the windows system I used before, the newly purchased M1 just arrived a few days ago. I encountered some problems when running the nacos container with docker desktop, so I make a record. I also hope my experience can help more people. First, the nacos image on the docker hub official website does not support the arm architecture. You need ...
Posted by chrisdarby on Sun, 28 Nov 2021 08:03:00 -0800
Gin framework: log configuration management
introduceThrough a complete example, manage logs reasonably in the Gin framework.What are the usage scenarios?Log auto scroll
Split into multiple log files
Log format modification
waitWe will use rk-boot To start the microservices of the Gin framework.Please visit the following address for a complete tutorial:https://rkdocs.netlify.app/cnins ...
Posted by phpPunk on Fri, 26 Nov 2021 11:47:10 -0800
Tars | Part 4 Subset routing rule service analysis and source code exploration
preface
Through the mid-term report and exchange meeting, the author has a deep understanding of Subset business process; At the same time, I also have an understanding of some misunderstandings in the early stage. This article is to update Subset business analysis and correct misunderstandings.
1. Subset is not load balancing
Bri ...
Posted by rajatr on Tue, 23 Nov 2021 15:58:34 -0800