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
810
httputil.ReverseProxy でもリトライがしたい
TOGASHI Tomoki
May 19, 2022
Tweet
Share
Other Decks in Programming
See All in Programming
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
CSC307 Lecture 15
javiergs
PRO
0
240
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
330
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.8k
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.6k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
130
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
850
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
180
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
430
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.9k
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
5
920
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
How to build a perfect <img>
jonoalderson
1
5.2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
A designer walks into a library…
pauljervisheath
210
24k
Designing for Performance
lara
611
70k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
970
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
150
Writing Fast Ruby
sferik
630
63k
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 フィードバックお待ちしています