This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This requires a couple of windows (or a screen/tmux session) | |
First create a fifo to use | |
mkfifo video.h264 | |
In the first window start raspivid in the following way | |
while true; do raspivid -n -vf -hf -w 460 -h 270 -b 512000 -t 36000000 -o video.h264 -v; done | |
In the second window start vlc like: | |
cvlc video.h264 --sout "#duplicate{dst=std{access=udp,mux=ts,dst=239.255.1.2:1234}}" :demux=h264 --ttl 4 -I http --sout-keep -v --loop |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
- Go HTTP standalone (as the control group)
- Nginx proxy to Go HTTP
- Nginx fastcgi to Go TCP FastCGI
- Nginx fastcgi to Go Unix Socket FastCGI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UseUtf8mb4Characterset < ActiveRecord::Migration | |
def up | |
# The migration has been done following: | |
# - http://mathiasbynens.be/notes/mysql-utf8mb4#utf8-to-utf8mb4 | |
# - http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-upgrading.html | |
database = Rails.configuration.database_configuration[Rails.env]["database"] | |
# Stop checking foreign keys | |
execute "SET foreign_key_checks = 0" |