- CONNECTメソッドのリクエストから、http.Hijackerを使って生のTCPコネクションを取り出す
- クライアントには200 okを返す
- 接続先ホストの証明書を、予め用意してあるroot証明書でサインして生成する
- 生成した証明書でクライアントとtls接続を確立する (root証明書が登録されていないとブラウザで警告が出る)
- goroutine起こして、クライアントとのtls接続からhttp requestを読み込む
- 受けたhttp requestをそのまま接続先hostに送信する
- 接続先hostからのhttp responseを、クライアントtls接続に書き込む
- EOFが来るまで 5-7繰り返し
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
package datastorebackup | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"google.golang.org/appengine" | |
"google.golang.org/appengine/log" | |
"google.golang.org/appengine/user" |
We already use Stackdriver Profiler in Production at Mercari!
- API gateway at Mercari JP
- Observability, Observability, Observability in Seeking SRE by Envoy author
- High Performance Go
- Profiling and Optimizing Go(Best performance tuning video ever!!)
- GolangでFlame Graphを描く
- Netflix FlameScope
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
Copyright (c) 2014 The Go Authors. All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are | |
met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above | |
copyright notice, this list of conditions and the following disclaimer |
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
// Sample logging-quickstart writes a log entry to Stackdriver Logging. | |
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"strings" |
mercari.go #4 https://mercari.connpass.com/event/105640/
- catatsuyというIDで各種SNS活動しています
- かたついって呼ばれています
- メルカリのSREチームで主にGoを書いています
- 前職はピクシブでpixivのHTTPS化・PHP7.1化・HTTP/2化や、広告サーバーの新機能追加など色々やっていました
#NoSQLデータモデリング技法
原文:NoSQL Data Modeling Techniques « Highly Scalable Blog
I translated this article for study. contact matope[dot]ono[gmail] if any problem.
NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。
本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う