当前位置:网站首页>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、
边栏推荐
- JMM详解
- How did ManageEngine Zhuohao achieve the goal of being selected into Gartner Magic Quadrant for four consecutive years?
- 第五章 輸入/輸出(I/O)管理
- High order binary search tree
- VS2019如何永久配置本地OpenCV4.5.5使用
- [ManageEngine] terminal management system helps Huasheng securities' digital transformation
- C语言课设图书信息管理系统(大作业)
- sci-hub如何使用
- Promise
- Mysql 表分区创建方法
猜你喜欢

C语言课设学生选修课程系统(大作业)

Design of sales management system for C language course (big homework)

Discrimination between left and right limits of derivatives and left and right derivatives

VS2019如何永久配置本地OpenCV4.5.5使用
![[ManageEngine Zhuohao] helps Julia college, the world's top Conservatory of music, improve terminal security](/img/fb/0a9f0ea72efc4785cc21fd0d4830c2.png)
[ManageEngine Zhuohao] helps Julia college, the world's top Conservatory of music, improve terminal security

高阶-二叉平衡树

sci-hub如何使用

How does the port scanning tool help enterprises?

Picture server project test

Redis安装到Windows系统上的详细步骤
随机推荐
[unity shader stroke effect _ case sharing first]
[summary of knowledge points] chi square distribution, t distribution, F distribution
JMM详解
SystemVerilog learning-08-random constraints and thread control
SQL语句
异常检测方法梳理,看这篇就够了!
Discrimination between left and right limits of derivatives and left and right derivatives
SystemVerilog learning-07-class inheritance and package use
如果我在广州,到哪里开户比较好?究竟网上开户是否安全么?
【微信小程序低代码开发】二,在实操中化解小程序的代码组成
码力十足学量化|如何在财务报告寻找合适的财务公告
下载外文期刊的方法
JSON module
Draw a directed graph based on input
Although pycharm is marked with red in the run-time search path, it does not affect the execution of the program
C语言课设图书信息管理系统(大作业)
【微信小程序】一文解决button、input、image组件
【#Unity Shader#自定义材质面板_第一篇】
Picture server project test
Redis安装到Windows系统上的详细步骤