アドベントカレンダー向けメモ: 半日で配信サーバをgolangで書き換えた話メモ
アドベントカレンダー書きに向けて
- リクエストに応じてmemcachedから値引っ張ってきてレスポンスを返す処理
0
- 勉強方法
1
- net/httpを使う
- 1リクエストを素直に書く
- 並列化、非同期化を意識せず書く
2
- 負荷試験
- プロファイリング https://github.com/davecheney/profile
- 結果例
3
- json -> msgpack https://github.com/vmihailenco/msgpack
- UNIX domain socket
- fd := flag.Uint("fd", 0, "fd to listen and serve")
- l, err := net.FileListener(os.NewFile(uintptr(*fd), ""))
- http.Serve(l, nil)
- gocache https://github.com/ghais/gocache