- Support HTTP/2
- Automatically install TLS certificates (echo)
HTTP server should have a default timeout value.
- net/http lib has a http server implementation
- fasthttp lib has a blazing fast http server
- NGINX is a production ready web server
Some old benchmarls: https://github.com/julienschmidt/go-http-routing-benchmark#conclusions
Features:
- f1: Simple mapping to structs(https://www.reddit.com/r/golang/comments/fzs8p1/what_orm_are_you_use/fn5zry1?utm_source=share&utm_medium=web2x).
Usage:
- Database connection (https://www.reddit.com/r/golang/comments/fzs8p1/what_orm_are_you_use/fn6cwz5?utm_source=share&utm_medium=web2x)
(database/sql)[https://golang.org/pkg/database/sql/]
In contrast to a sql library, an ORM gives you a unified syntax, which it's loosely coupled from a particular database. It would be a pain if you are selling a product to enterprises and you had to support oracle and Sql server at the same time. Some ORM implementation select all row and and do filter internally. For example, if you do select on table A where Id = 1, a bad ORM implementation will select all row in table A (which cause large memory usage on your application) and then filter the result internally. That is just select operation. If you use a lot of join, it would get worse.
Pros: Saves you the verbosity of SQL + manually mapping fields, helps with managing migrations (https://www.reddit.com/r/golang/comments/a6yo8k/do_you_use_database_in_your_go_project/ebz0s5f?utm_source=share&utm_medium=web2x)
Cons: Complicated queries are better handled by sql directly. (https://www.reddit.com/r/golang/comments/fzs8p1/what_orm_are_you_use/fn65ugr?utm_source=share&utm_medium=web2x)
It's sort of an ehancement of stdlib and a superset of sqlx. It does:
- Query building
- Struct binding
- Relationship management/querying Selling post: https://www.reddit.com/r/golang/comments/aq7a59/how_is_sqlboiler_better_than_stdlib_sql_or_sqlx/emwkd59?utm_source=share&utm_medium=web2x
- Beego
- Buffalo
Pros: Cons:
-
Middleware for compression implementation is broken. For each request, echo server will create new gzip writer (https://github.com/labstack/echo/blob/f867058e3ba4fa4504e3ca976b31012db3ce1555/middleware/compress.go#L72)(https://blog.klauspost.com/gzip-performance-for-go-webservers)
-
Default server has no timeout values labstack/echo#590