mtchuyen / Golang-Tips

Tips in Golang programming
3 stars 2 forks source link

Golang HTTP Web #10

Open mtchuyen opened 3 years ago

mtchuyen commented 3 years ago

E-Tag — The most underrated HTTP cache

mtchuyen commented 2 years ago

How to practically use Performance API to measure performance

https://blog.logrocket.com/how-to-practically-use-performance-api-to-measure-performance/

Prometheus Metrics by Example: 5 Things You Can Learn

https://www.sentinelone.com/blog/prometheus-metrics-by-example/

What is Response Time Testing? How to Measure for API, Tools

https://www.guru99.com/response-time-testing.html

mtchuyen commented 2 years ago

How to run a load test of 50k+ concurrent users

https://www.blazemeter.com/blog/how-run-load-test-50k-concurrent-users

mtchuyen commented 2 years ago

Proper HTTP shutdown in go

https://medium.com/@momchil.dev/proper-http-shutdown-in-go-bd3bfaade0f2

mtchuyen commented 2 years ago

Don’t Make This Mistake with Go HTTP Servers

https://ryanc118.medium.com/dont-make-this-mistake-with-go-http-servers-bd313baee41

The important concepts of Web Server Handlers in Golang

https://blog.tcmlabs.fr/the-important-concepts-of-web-server-handlers-in-golang-8bab49a8b020

mtchuyen commented 1 year ago

PerformanceServerTiming & Server-Timing

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing

one or more metrics and descriptions for a given request-response cycle. It is used to surface any backend server timing metrics (e.g. database read/write, CPU time, file system access, etc.) in the developer tools in the user's browser or in the PerformanceServerTiming interface.

This Lib:

mtchuyen commented 1 year ago

NewServeMux

https://github.com/chauhanr/go-cookbook/blob/462a1aa1f54fea13ad4d87333a34e0e008fad869/09-servers/recipe05/http-handle.go

https://github.com/go-park-mail-ru/2018_2_DeadMolesStudio/blob/master/middleware/middleware.go

mtchuyen commented 1 year ago

CSRF Token

CSRF Token sẽ bảo vệ web của bạn khỏi lỗ hổng bảo mật phổ biến. Một token CSRF là tính năng bảo vệ ứng dụng web khỏi các cuộc tấn công giả mạo. Nó cho phép server ứng dụng kiểm tra xem một biểu mẫu được gửi từ trình duyệt thực sự hay do hacker giả mạo.

CSRF token là các trường nhập biểu mẫu (thường là biểu mẫu POST), giúp theo dõi phiên hoạt động của người dùng. Một framework ứng dụng web phía server thường tạo token CSRF cho từng phiên người dùng độc đáo. Server này kiểm tra xem liệu token có chính xác bất cứ khi nào người dùng gửi biểu mẫu. Token CSRF thường bao gồm các chuỗi và số ngẫu nhiên, khiến giá trị của chúng khó dự đoán.

Để ngăn hacker đánh cắp token CSRF, Django làm mới nó mỗi lần khởi động một phiên người dùng.

mtchuyen commented 7 months ago

The important concepts of Web Server Handlers in Golang

https://blog.tcmlabs.fr/the-important-concepts-of-web-server-handlers-in-golang-8bab49a8b020