Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Goサーバをあえて不安定にするパッケージを作った話
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hazumi Ichijo
January 31, 2019
Programming
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Goサーバをあえて不安定にするパッケージを作った話
Go(Un)Conference(Goあんこ)LT大会 5kg
https://gounconference.connpass.com/event/112942/
Hazumi Ichijo
January 31, 2019
More Decks by Hazumi Ichijo
See All by Hazumi Ichijo
RailsとRidgepoleの マイグレを120倍早くする
hazumirr
0
430
CIを整備してメンテナンスを生成AIに任せる
hazumirr
0
1.5k
病院の情報フローを理解して、 予約〜会計の見え方が変わった話
hazumirr
1
1.9k
Rubyのコード削除したい時 僕がやること
hazumirr
0
290
テーブル駆動テストと状態
hazumirr
5
2.2k
オンラインテストしようと思った その日に開始できる環境を目指して
hazumirr
0
1.1k
推薦によるプロダクト改善とマイクロサービスが噛み合った話
hazumirr
2
4.8k
ChatGPTで僕が知っていることまとめ
hazumirr
3
3.1k
プロダクトチームとどう 協業し分析環境を改善するか
hazumirr
2
1.6k
Other Decks in Programming
See All in Programming
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
320
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
380
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
520
源内ハンズオン概要編
hideg
0
190
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
290
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
980
今さら聞けない .NET CLI
htkym
0
190
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
190
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
260
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
160
Featured
See All Featured
Designing for Performance
lara
611
70k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
290
Building an army of robots
kneath
306
46k
Visualization
eitanlees
152
17k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
370
Done Done
chrislema
186
16k
Leo the Paperboy
mayatellez
8
2.1k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Transcript
©2018 Wantedly, Inc. GoαʔόΛෆ҆ఆʹ͢Δ ύοέʔδΛ࡞ͬͨ 31.Jan.2019 - Hazumi Ichijo
©2018 Wantedly, Inc. ࣗݾհ Ұᑍ!IB[VNJSS!SFSPTU 4FSWFS4JEF&OHJOFFSJO8BOUFEMZ (P 3BJMT 3FBDUʜ ग़ւಓ
©2018 Wantedly, Inc. མͪͯͯྑ͍αʔϏε ϝΠϯͷαʔϏε Ϣʔβʔ
©2018 Wantedly, Inc. མͪͯͯྑ͍αʔϏε ϝΠϯͷαʔϏε Ϣʔβʔ མͪͯͯྑ͍αʔϏε ϝΠϯͷαʔϏε Ϣʔβʔ
©2018 Wantedly, Inc. མͪͯͯྑ͍αʔϏε ϝΠϯͷαʔϏε Ϣʔβʔ མͪͯӨڹ͕ग़ͳ͍Α͏ʹ͢ΔͨΊʹɺ $JSDVJU#SFBLFSͱ͍͏ͷ͕ଘࡏ͢Δ IUUQTHJUIVCDPNTPOZHPCSFBLFS
IUUQTHJUIVCDPNSVCZJTUDJSDVJUCSFBLFS
©2018 Wantedly, Inc. CircuitBreaker͕ຊʹ͏·͘ಈ͔͘ෆ҆ => ಈ͔͚ͩ͘γϡοͱ֬ೝ͍ͨ͠
©2018 Wantedly, Inc. Ͳ͏ͬͯෆ҆ఆʹ͢Δ͔ w ίʔυʹQBOJDͱ͔ΛೖΕΔʁ Ͳ͏͍ͬͨৼΔ͍Λ͢Δ͖͔ w
൪Λฦ͢ʁϨεϙϯεΛ͘͢Δʁ
©2018 Wantedly, Inc. Ͳ͏ͬͯෆ҆ఆʹ͢Δ͔ Ϣʔβʔ ϝΠϯͷαʔό͔Βݟ͑Δͷ Ϩεϙϯε͚ͩ IUUQH31$
©2018 Wantedly, Inc. Ͳ͏ͬͯෆ҆ఆʹ͢Δ͔ Ϣʔβʔ ͚ͩ͜͜ʹෆ҆ఆ͞Λ͍ΕΕ͍͍
©2018 Wantedly, Inc. Ͳ͏ͬͯෆ҆ఆʹ͢Δ͔ Ϣʔβʔ H31$*OUFSDFQUPS IUUQ.JEEMFXBSF
©2018 Wantedly, Inc. Ͳ͏͍ͬͨৼΔ͍Λ͖͔͢ https://engineering.linkedin.com/blog/2018/05/linkedout--a-request-level-failure-injection-framework -JOLFEJOͷ'BJMVSF*OKFDUJPO'SBNFXPSLͰ w &SSPS w %FMBZ
w 5JNFPVU ͷͭΛೖΕ͍ͯΔ
©2018 Wantedly, Inc. Ͳ͏͍ͬͨৼΔ͍Λ͖͔͢ https://engineering.linkedin.com/blog/2018/05/linkedout--a-request-level-failure-injection-framework -JOLFEJOͷ'BJMVSF*OKFDUJPO'SBNFXPSLͰ w &SSPS w %FMBZ
w 5JNFPVU ͷͭΛೖΕ͍ͯΔ ͦͷ͏ͪɺ&SSPSɾ5JNFPVU͕͋Εࢼͤͦ͏ɻ ߋʹɺͦ͏͍ͬͨৼΔ͍ϥϯμϜʹى͖ΔΑ͏ʹ͍ͨ͠ αʔϏεΛ6OJY5JNF͕/ͰׂΓΕΔͱ͖ΞϗʹͳΔΑ͏ʹ͢Εྑ͛͞
©2018 Wantedly, Inc. Ͳ͏͍ͬͨৼΔ͍Λ͖͔͢ { "interval": 1, "slow_response_option": { "enable":
true, "time": 5 }, "server_error_option": { "enable": true } }
©2018 Wantedly, Inc. ͦ͏͍ͬͨύοέʔδΛ࡞ͨ͠ https://github.com/rerost/unstable
©2018 Wantedly, Inc. package main import ( "fmt" "net/http" "github.com/rerost/unstable/uhttp"
) func main() { http.Handle("/", uhttp.WithUnstable(handler)) if err := http.ListenAndServe(":3000", nil); err != nil { fmt.Println(err) } } func handler(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Sample")) }
©2018 Wantedly, Inc. package main import ( "context" "log" "net"
"github.com/golang/protobuf/ptypes/empty" api_pb "github.com/rerost/unstable/example/grpc/server/api" "github.com/rerost/unstable/ugrpc" "google.golang.org/grpc" "google.golang.org/grpc/reflection" ) type server struct{} func (s *server) GetSample(ctx context.Context, req *empty.Empty) (*api_pb.GetSampleResponse, error) { return &api_pb.GetSampleResponse{Message: "Sample"}, nil } func main() { l, err := net.Listen("tcp", ":5000") if err != nil { log.Fatalf("Failed to listen: %v", err) } s := grpc.NewServer( grpc.UnaryInterceptor(ugrpc.UnstableUnaryServerInterceptor()), ) api_pb.RegisterSampleServiceServer(s, &server{}) reflection.Register(s) if err := s.Serve(l); err != nil { log.Fatalf("Failed to serve: %v", err) } }
©2018 Wantedly, Inc. Demo
©2018 Wantedly, Inc. γϡοͱ'BVMU*OKFDUJPO͍ͨ͠ͱ͖ʹ͓͢͢Ί $IBPT&OHJOFFSJOHͱ͔ఆ͍ͯ͠ͳ͍