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
httputil.ReverseProxy でもリトライがしたい
Search
TOGASHI Tomoki
May 19, 2022
Programming
1
770
httputil.ReverseProxy でもリトライがしたい
TOGASHI Tomoki
May 19, 2022
Tweet
Share
Other Decks in Programming
See All in Programming
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
49
32k
5つのアンチパターンから学ぶLT設計
narihara
1
130
#QiitaBash MCPのセキュリティ
ryosukedtomita
0
500
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
150
エラーって何種類あるの?
kajitack
5
330
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
170
Goで作る、開発・CI環境
sin392
0
180
GoのGenericsによるslice操作との付き合い方
syumai
3
700
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
340
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
120
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
160
ニーリーにおけるプロダクトエンジニア
nealle
0
690
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Done Done
chrislema
184
16k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
It's Worth the Effort
3n
185
28k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
4 Signs Your Business is Dying
shpigford
184
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
A better future with KSS
kneath
239
17k
A Tale of Four Properties
chriscoyier
160
23k
Transcript
httputil.ReverseProxy でも リトライがしたい 2022/05/19 | golang.tokyo #32 TOGASHI Tomoki
ABOUT ME 富樫 知基 (TOGASHI Tomoki) バックエンドエンジニア @ ARIGATOBANK Go,
Kubernetes, Google Cloud 🐈, 🐈⬛, ⌨️ @clomie
go-retryabletransport https://github.com/toga4/go-retryabletransport
リトライする http.RoundTripper
ライブラリ作成の動機
動機 たまに起きる接続エラー ↓ リトライしたい httputil.ReverseProxy
動機 http.RoundTripper で実装が必要 実装のプラクティスを集約したい リトライトリガーの定義 バックオフ問題 net/http/httputil.ReverseProxy でリトライしたい
使いかた
使いかた
使いかた Backoff 設定
使いかた 親の Transport
使いかた リトライトリガー(エラー)
使いかた リトライトリガー(レスポンス)
使いかた
Backoff
Backoff インターフェースのみ、実装を提供しない 代わりに既存の Backoff モジュールのアダプタを提供 github.com/googleapis/gax-go/v2 github.com/lestrrat-go/backoff/v2
github.com/lestrrat-go/backoff/v2 指数バックオフ
github.com/lestrrat-go/backoff/v2 定数バックオフ
go-retryabletransport https://github.com/toga4/go-retryabletransport フィードバックお待ちしています