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
820
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
httputil.ReverseProxy でもリトライがしたい
TOGASHI Tomoki
May 19, 2022
Other Decks in Programming
See All in Programming
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
140
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
100
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
680
React本体のコードリーディング
high_g_engineer
1
140
メールのエイリアス機能を履き違えない
isshinfunada
0
230
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
510
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
540
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
310
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
160
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.7k
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
320
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
119
120k
ラッコキーワード サービス紹介資料
rakko
1
4.3M
Docker and Python
trallard
47
4.1k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Everyday Curiosity
cassininazir
0
270
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
250
Making the Leap to Tech Lead
cromwellryan
135
10k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
680
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
How to train your dragon (web standard)
notwaldorf
97
6.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
290
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 フィードバックお待ちしています