当前位置:网站首页>Grain Mall - environment (p1-p27)
Grain Mall - environment (p1-p27)
2022-07-01 06:33:00 【A small salted fish I】
List of articles
1、 Project architecture
Separate the front and back development , It is divided into internal network deployment and external network deployment , The Internet is accessible to the public , Deploy front-end projects , You can have a cell phone APP, Computer web page ; The backend cluster is deployed in the intranet , The front end operates on the page and sends requests to the back end , On the way there will be Nginx colony ,Nginx Forward the request to API gateway (springcloud gateway)( The gateway can dynamically route to the specified service according to the current request , See whether the current request wants to call commodity service, shopping cart service or retrieval ), From routing, if there are many requests , You can load balance one of the commodity servers ( Goods and services are copied in multiple copies ), When there is a problem with the commodity server, you can also fuse or degrade the service at the gateway layer ( Use Alibaba's sentinel Components ), The gateway also has other functions, such as authentication and authorization 、 Current limiting ( Release only part to the server ) etc. .
Process after arriving at the server (springboot Service for micro ), Services and services may call each other ( Use OpenFeign Components ), Some requests may be logged in ( be based on OAuth2.0 The certification center of . Security and access springSecurity control )
The service may hold some data or need to use a cache , We use redis colony ( Fragmentation + The sentry cluster ). Persistent usage mysql, Read write separation and sub database sub table .
Message queues are used between services (RabbitMQ), To achieve asynchronous decoupling , Consistency of distributed transactions . Some services may require Full-text Retrieval , Retrieve product information , Use ElaticSearch.
Services may need to access data , Use Alibaba cloud's object storage service OSS.
After the project goes online, in order to quickly locate the problem , Use ELK Processing logs , Use LogStash Collect all kinds of logs in the business , Store logs in ES in , use Kibana Visualize pages from ES Retrieve relevant information from , Help us quickly locate the problem .
In distributed systems , Because each of our services can be deployed on many machines , Services and services may call each other , We need to know where we are , So you need to register all services in the registry . Service finds the location of other services from the registry ( Use Ali Nacos As a registry ).
There are many configurations for each service , In order to change one configuration, the same configuration is changed synchronously , You need to configure the center , Also use Ali's Nacos, The service dynamically fetches configuration from the configuration center .
Service tracking , Track what went wrong with the service call chain , Use springcloud Provided Sleuth、Zipkin、Metrics, Give the information of each service to open source Prometheus Do aggregate analysis , Again by Grafana Make a visual presentation , Provide Prometheus Provided AlterManager Get the alarm information of the service in real time , By text / Inform service developers by mail .
It also provides continuous integration and continuous deployment . After the project is released , Because there are so many micro services , It's too cumbersome to package and deploy each to the server , With continuous integration, developers can submit the modified code to github, Operation and maintenance personnel can use automation tools Jenkins Pipeline take github The code obtained in is packaged into docker Mirror image , Ultimately it is k8s Integrate docker service , Will serve with docker The way the container works .
2、linux Environment building
adopt vitualbox,vagrant Can quickly build a virtual machine , He has a mirror warehouse .
Go to https://www.vagrantup.com/ download vagrant install , Restart the system after installation .cmd Input in vagrant A version means success .
Input vagrant init centos/7, You can initialize a centos7 System .( Note the directory in which this command is executed , His Vagrantfile Just where it was generated )
vagrant up Start the virtual machine environment .
Appears after startup default folder:/cygdrive/c/User/… =>/vagrant. then ctrl+c sign out
The previous page has ssh Account information .vagrant ssh Will connect to the virtual machine . have access to exit sign out
But the network he uses is network address translation NAT( Port forwarding ), If other hosts want to access the virtual machine , Must be windows Port such as 3333 Disconnect the port to the virtual machine, such as 3306. So every time linux Every software in Ryan needs port mapping , inconvenient ,( It can also be in virualBox Set it one by one ). We want to give the virtual machine a fixed ip Address ,windows And virtual machines can interact with each other ping through .
3、
4、
5、
6、
7、
8、
9、
10、
边栏推荐
- SystemVerilog learning-10-validation quantification and coverage
- SQL学习笔记2
- High order binary search tree
- Picture server project test
- SQL statement
- Teach you how to implement a deep learning framework
- [summary of knowledge points] chi square distribution, t distribution, F distribution
- 数据库对象:视图学习记录
- 虚幻 简单的屏幕雨滴后处理效果
- 给逆序对数求原数组
猜你喜欢

Application of IT service management (ITSM) in Higher Education

ForkJoin和Stream流测试

C language course set up student elective course system (big homework)

下载外文期刊的方法

Async and await

SQL学习笔记九种连接2

C语言课设图书信息管理系统(大作业)

高阶-二叉平衡树
![[network security tool] what is the use of USB control software](/img/cc/20fc1f35c139c52c5922727368b835.png)
[network security tool] what is the use of USB control software

FPGA - 7 Series FPGA internal structure clocking-01-clock Architecture Overview
随机推荐
Functions of switch configuration software
Detailed steps for installing redis on Windows system
Requests module (requests)
C语言课设图书信息管理系统(大作业)
C language course set up property fee management system (big work)
High order binary balanced tree
Embedded system
[ManageEngine Zhuohao] helps Huangshi Aikang hospital realize intelligent batch network equipment configuration management
[ManageEngine Zhuohao] use unified terminal management to help "Eurex group" digital transformation
【#Unity Shader#Amplify Shader Editor(ASE)_第九篇】
数据库产生死锁了请问一下有没有解决办法
数据库笔记
mysql约束学习笔记
C语言课设职工信息管理系统(大作业)
C语言课设学生考勤系统(大作业)
[unity shader amplify shader editor (ASE) Chapter 9]
[ManageEngine Zhuohao] mobile terminal management solution, helping the digital transformation of Zhongzhou aviation industry
Application of IT service management (ITSM) in Higher Education
[ITSM] what is ITSM and why does it department need ITSM
What are the functions of LAN monitoring software