doorman2
Joined 4 years ago
Joined 4 years ago
What we're seeing now is akin to the the dotcom boom / bust in the late 90s and early 2000s. A new technology has appeared on the scene which leads to two things:
1) People get ahead of themselves. In the late 90s, people could envision all the cool things the internet would unlock and tried to start businesses to realize the potential. Many of those business ideas would be viable today, but the tech wasn't there at the time leading to a lot of empty promises being sold. Today, people can envision how the blockchain will lead to the securitization of everything, but the tech isn't quite there to make the transition yet.
2) As with any optimism boom, there will always be crooks ready to separate a fool from their money.
[0]: https://www.sec.gov/Archives/edgar/data/1652044/000165204422...
What does that mean? The NYT sells ads, i.e. you can pay the NYT to have your advertisement shown in the NYT. Google sells ads, i.e. you can pay Google to have your advertisement shown in Google results. The NYT and Google sell the same thing. They are competitors.
int sfd = socket(domain, socktype, 0);
int optval = 1;
setsockopt(sfd, SOL_SOCKET, SO_REUSEPORT, &optval, sizeof(optval));
bind(sfd, (struct sockaddr *) &addr, addrlen);
In Go, you can use syscall.SetsockoptInt. Most languages have a way of setting this option. You have to create the socket yourself and pass it into your HTTP server in most cases, but it depends on the library.Edit: oh sorry, you meant when systemd is opening the port for you. It looks like you can set ReusePort=yes in your configuration? https://www.freedesktop.org/software/systemd/man/systemd.soc...
This option is also quite good for deployments as you can have instances stop reading from the port while client traffic is still being served from other instances on the port. This works well for HTTP requests, but less so for something like gRPC.