Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
httputil.ReverseProxy でもリトライがしたい
TOGASHI Tomoki
May 19, 2022
Programming
1
180
httputil.ReverseProxy でもリトライがしたい
TOGASHI Tomoki
May 19, 2022
Tweet
Share
Other Decks in Programming
See All in Programming
Why Airflow? & What's new in Airflow 2.3?
kaxil
0
110
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @wad2022
manfredsteyer
PRO
0
120
Value and Record Types
hschwentner
0
540
A Philosophy of Software Design 後半
yosuke_furukawa
PRO
9
2.5k
Git・Git-Flowについて
nerusan_main
0
400
PythonユーザによるRust入門
rmizuta3
9
3k
Airflowはすごいぞ!
hankehly
0
360
React NativeアプリにStorybook CSF3.0を導入しよう
texmeijin
0
150
Cross Deviceチームにおけるスマートテレビアプリ開発ってどんな感じ?
cokaholic
0
120
はてなフォトライフをECSに移行した話 / Hatena Engineer Seminar #20
cohalz
1
810
EFFICIENT CREATION OF AN EMPTY COLLECTION IN .NET
abt
0
150
IE Graduation (IE の功績を讃える)
jxck
20
12k
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
499
110k
Testing 201, or: Great Expectations
jmmastey
21
5.4k
Building an army of robots
kneath
299
40k
Fontdeck: Realign not Redesign
paulrobertlloyd
73
4.1k
Done Done
chrislema
174
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
4
500
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
Design by the Numbers
sachag
271
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
37
3.2k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
Ruby is Unlike a Banana
tanoku
91
9.2k
Writing Fast Ruby
sferik
612
57k
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 フィードバックお待ちしています