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
540
httputil.ReverseProxy でもリトライがしたい
TOGASHI Tomoki
May 19, 2022
Tweet
Share
Other Decks in Programming
See All in Programming
Goのmultiple errorsについて (2024年4月版)
syumai
3
610
What We Can Learn From OSS
inouehi
0
420
Anthropic Cookbook のおすすめレシピ
schroneko
7
880
SIMD Parallel Programming with the Vector API
josepaumard
0
120
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
360
Hanami and htmx
bkuhlmann
0
210
"config" ってなんだ? / What is "config"?
okashoi
0
240
Ruby Function Composition
bkuhlmann
1
330
Site Reliability Engineering for GMO
pyama86
7
1k
try! Swift Tokyo 2024のLT枠に採択されたプロポーザルを出すときに考えていたこと
ski
0
350
Elm Form Validation
bkuhlmann
0
510
Featured
See All Featured
Web development in the modern age
philhawksworth
202
10k
YesSQL, Process and Tooling at Scale
rocio
164
13k
Writing Fast Ruby
sferik
621
60k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Bash Introduction
62gerente
604
210k
Atom: Resistance is Futile
akmur
259
25k
The Cult of Friendly URLs
andyhume
74
5.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
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 フィードバックお待ちしています