Is there a relationship between fasthttp and httprouter in the go language?

for the goweb framework, there is a blog saying:

there are a lot of Go Web frameworks at present, and there are a lot of man-made wheels, which is related to the simplicity and extensibility of Go Web"s design. If I find official routing inconvenient, I can easily create another wheel, which is also due to the proliferation of go web frames / router, so that some people call for early wheels.

from the existing web framework, it can be divided into two categories according to the lower level of the framework. One is the web framework based on the official net/http standard library, and the other is the standard library framework based on fasthttp. Obviously based on fasthttp has better performance, but this kind of framework also has its shortcomings, does not fully support HTTP protocol, such as does not support HEAD, does not support HTTP2, has its own advantages and disadvantages, how to choose to give it to the user, combined with their own actual situation to choose. The Echo framework, for example, has removed support for fasthttp in the latest version.

in addition, julienschmidt"s httprouter has good performance, which is why several routers in the web framework use it.

question:
1, is there a relationship between httprouter and fasthttp?
2. Fasthttp does not support HTTP2 and HEAD,. Does httprouter support these two things?

Sep.03,2021

doesn't matter. httprouter is based on net/http , but there is a based on fasthttp

.
Menu