rencently I am thinking about have Geo routing in APISIX,
scenario:
    1、I want route user‘s request from country request intoto different
upstream host.
    2、When users from outside China redirect to international homepage(many
video sites like youku.com they ban users from outside china).


here is two solution I digged into:

1、intergrate nginx module https://github.com/leev/ngx_http_geoip2_module and
do variable matching.
     disadvantage: we need calculate the geo data from ip info for every
request,which is so inefficient.


2、https://luarocks.org/modules/agladysh/lua-geoip
     intergrate this lua module into lua-resty-radixtree, when geo_ip_*
parameter is set in the routes, we calculate the ip country info from geoip
library.so  that  it wont calculate the geo data for each request.

Reply via email to