GoFrame framework: graceful closing process
introduceThrough a complete example, this paper introduces how to close gracefully gogf/gf Microservices.What is elegant closure?When the process receives the shutdown signal, we need to close the logic running in the background, such as MySQL connection, etc.We will use rk-boot To start gogf/gf Microservices.rk-boot Is a framework that can sta ...
Posted by mrbaseball34 on Wed, 05 Jan 2022 14:50:23 +0100
Gin security chapter-2: fast implementation of server-side JWT verification
introduceThis article describes how to rk-boot Implement the server JWT verification logic.What is JWT?JSON network token is an Internet standard used to create data with optional signature or optional encryption so that claims can be safely represented between two parties. The token is signed with a private secret or public / private key.In sh ...
Posted by GameYin on Tue, 04 Jan 2022 21:43:37 +0100
Go processes data efficiently through streaming API s such as Map/Filter/ForEach
What is stream processing
If you have Java experience, you will be full of praise for java8 Stream, which greatly improves your ability to process collection type data.
int sum = widgets.stream()
.filter(w -> w.getColor() == RED)
.mapToInt(w -> w.getWeight())
.sum();
Stream enables us to support ...
Posted by Joopy on Tue, 04 Jan 2022 05:38:27 +0100
Spring Boot: detailed explanation of microservice application monitoring Spring Boot Actuator
introduction Under the current microservice architecture, many services will be deployed on different machines and interact with each other through service invocation. A complete business process will be processed and transmitted by many microservices. Therefore, how to know the health status of each service is particularly important.
Fortunate ...
Posted by izlik on Mon, 03 Jan 2022 17:48:08 +0100
Nacos service registry quick start
Nacos registry overview
Functions: service registration, discovery and configuration To avoid a large number of codes appearing in the configuration file, the service needs to be restarted after each configuration update, and the dynamic publishing configuration cannot be realized. Therefore, Nacos appears Official website:
https://nacos.io/z ...
Posted by csatucd on Mon, 03 Jan 2022 10:45:23 +0100
Beats, Logstash and Kibana knowledge summary
Beats
Introduction to Beats:
Lightweight data collector: Beats platform integrates a variety of single purpose data collectors. They come from hundreds or thousands of machines The device and system send data to Logstash or Elasticsearch.Beats series: full category collector to handle all data types. ① Filebeat: log file ② Metricbeat: ind ...
Posted by mullz on Mon, 03 Jan 2022 09:35:18 +0100
sentinel integrates springcloud alibaba
sentinel integrates springcloud alibaba
1. Introducing dependencies
<!--sentinel starter-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
2. Add yml configuration to set sentinel console address for microser ...
Posted by mkubota on Sun, 02 Jan 2022 18:47:11 +0100
mock feign Client in microservice for restful unit test
Today, I share a unit test example of restful interface in microservice, which mainly involves three aspects: mock of internal call, serialization and deserialization of interface DTO, and accelerating the execution of unit test cases with MockMvc.
Unit testing requires that it does not rely on external services, so that it can be easily exec ...
Posted by laflair13 on Fri, 31 Dec 2021 18:22:58 +0100
Summary of common commands for Docker and Dockerfile and packaging Docker images for microservices
1, Summary of common Docker commands
1. Help command
# View all command details of docker
docker --help
# View the usage details of the corresponding command of docker
docker command --help
# For example, check the usage of docker images
docker images --help
[root@fussy ~]# docker images --help
Usage: docker images [OPTIONS] [REPOSITOR ...
Posted by unrelenting on Thu, 30 Dec 2021 22:12:27 +0100
There is no one of the simplest service response time optimization methods
Preface - From Wan Junfeng Kevin
The average delay of the service is basically about 30ms. One of the very big prerequisites is that we make extensive use of MapReduce technology, so that even if our service calls many services, it often depends only on the duration of the slowest request.
For your existing services, you do not need to optimi ...
Posted by twistisking on Thu, 30 Dec 2021 20:13:38 +0100