Search code examples
api-gatewayjson-rpc

How do I distribute JSON-RPC requests to backends?


Good day to all! Try to decipher the question more extensively. JSON RPC requests come from users in the form:

{
"" json rpc ":" 2.0 ",
"method": "abc.new",
"id": 423,
"params": {
"card": {
"pan": "9342309420",
"expiry": "4234"
}
}
}

and depending on the incoming requests, they need to be distributed among the backends. What tool and how can you achieve this? Thanks in advance for your reply


Solution

  • I found the answer. This can be done using nginx+lua. but to be even more precise, using openresty. maybe it will be useful to someone