当前位置:网站首页>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、
边栏推荐
- 嵌入式系统
- C语言课设物业费管理系统(大作业)
- Dongle data collection
- SQL学习笔记九种连接2
- [ManageEngine Zhuohao] the role of LAN monitoring
- Discrimination between left and right limits of derivatives and left and right derivatives
- [postgraduate entrance examination advanced mathematics Wu Zhongxiang +880 version for personal use] advanced mathematics Chapter II Basic Stage mind map
- Chapitre V gestion des entrées / sorties
- DML statement in SQL (data operation language)
- C语言课设学生考勤系统(大作业)
猜你喜欢

Student attendance system for C language course (big homework)

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

嵌入式系统

C语言课设工资管理系统(大作业)

自开发软件NoiseCreater1.1版本免费试用
![[unity shader custom material panel part II]](/img/d1/8632ae680299a27b7431b2d6e03fd3.png)
[unity shader custom material panel part II]

JMM details

FPGA - 7 Series FPGA internal structure clocking-01-clock Architecture Overview

C language course design student information management system (big homework)
![[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
随机推荐
Idea easy to use plug-in summary!!!
【#Unity Shader#Amplify Shader Editor(ASE)_第九篇】
根据输入画有向图
三说 拷贝构造之禁用
考研目录链接
VS2019如何永久配置本地OpenCV4.5.5使用
三分钟带你快速了解网站开发的整个流程
[self use of advanced mathematics in postgraduate entrance examination] advanced mathematics Chapter 1 thinking map in basic stage
微信公众号内嵌跳转微信小程序方案总结
请求模块(requests)
网络爬虫
sci-hub如何使用
软件工程复习
HCM Beginner (I) - Introduction
DSBridge
给逆序对数求原数组
HCM Beginner (III) - quickly enter pa70 and pa71 to browse employee information PA10
Self confidence is indispensable for technology
数据库笔记
PAT (Advanced Level) Practice 1057 Stack