All Posts

Note for effective go

Although it's not the first time I read Effective Go, it's also very rewarding to read it again. I didn't record some reading feelings and records in my previous readings, so I can't miss this opportunity this time. At the end, I also read a handful of Thanos' coding guide, and also made up some.

CSRF security defense in front and back-end separation scenarios

In recent years, we have been doing front-end and back-end projects, and recently wrote a little bit of front-end code, using the restful style of front-end and back-end separation, but when asked about security issues during the review, we found that we had not considered this aspect, so here we will think about how to prevent CSRF and XSS, two common network attacks in the restful API scenario of front-end and back-end separation.

API performance test tool: wrk

Before learning about wrk, my understanding of performance testing had been limited to ab (Apache Benchmark). I had the impression that the functionality of ab was relatively simple, that is, simply pressure testing a given API and then seeing how much concurrency was there. So I learned about it, and then I saw that other people were interested in wrk, so I recorded something about wrk in the meantime.

Why stress can not make cpu so busy

Today, I want to try to reproduce a problem, the need to achieve an effect is to fill the CPU, creating a very high load, my first idea is to use stress, the results found that actually have not been able to play, can only play half (50%) to the top, so explore what the problem, by the way, for the record

Debug Docker No Logging Showing In Docker Logs

Recently, when trying a project, I found that the business was not normal, and then I wanted to see what errors were output from the logs in the Docker Container, and then I actually did not see any logs, so I positioned them in passing and simply made a record.

Comparison of the Go package management tool: dep vs go module

Recently, I migrated some of the project's dependency management tools from dep to go module, and there are some cool places and some unpleasant places, so here's a brief introduction to some of my personal views and feelings about the migration process.

How http2 build connection

In one of my previous articles: Handling GRPC Go Connection Handshake Issues, I described a problem I encountered with I described a Go GRPC problem I encountered and how it was eventually solved, and finally left myself a pitfall: how the http2 connection was established. Here’s how to fill that hole.

GRPC Go Connection Handshake Problem Solution

The services in our group provide both GRPC and HTTP interfaces, and most of the HTTP interfaces are directly converted from GRPC via grpc-gateway. Here is a brief description of the root cause and the solution.

AWK Command Usage

The power of the Linux command line is well known, but there are so many magic tools in Linux that it's really hard to learn them all at once, so if you don't know which one to start with, try awk first and you'll love it!

Add printer in manjaro