Slide 20
Slide 20 text
Routing - LEGY
> LINE Event Delivery Gateway – API Gateway written in Erlang
• Routing DSL
legy_dispatcher public_dispatcher (
CLIENT_TYPE = #{
<<"ANDROID">> => 'android.talk-server',
<<"IOS">> => 'iphone.talk-server’,
... }.
cf_select_upstream_by_client CLIENT_TYPE.
cf_url_handler
"^/(?P[A-Z]+)[^¥.]*$" #{
<<"THEME">> => 'theme.shop-server',
<<"MESSAGE">> => default,
})
LEGY
/talk-server-BETA
{"android": [.., "SVR01.jp", ..],
“iphone”: [.., ”SVR02.jp“, ..], ...}
/instance.json
/talk-server-RELEASE
SVR01.jp
Android /MESSAGE req
iOS /MESSAGE req
SVR02.jp
public_legy_release.conf