Question

Hey I noticed some venues use multiple gateways to conduct different activities For example one gateway used for Order Routing and another gateway solely used for Market Data.

What are the benefits of this?

Was it helpful?

Solution

Basically, the two roles have quite different requirements, and it's easy to logically separate out the handling of the two connections.

  • Market data connections are usually very high-traffic, and predominantly one-way. Since there's no order traffic on it, the need for log-keeping is greatly reduced. If the market data connection has a hiccup, it's not a big deal -- just start it back up again and keep trading. Anything you missed in the downtime is stale info anyway.

  • Order routing connections are time-sensitive two-way traffic. You'll want to log darn-near everything in case you need to audit later. If the connection goes down, you might need to verify your orders and program state (filled/canceled orders, etc) when you restore it.

In projects I've worked on, we'll have a MD component and an OR component. The two connections allow us to separate the handlers into two somewhat independent sets of logic. The MD component will store relevant data in a common location, which the OR component will refer to. (This common location may be an outside DB, or it may just be some shared memory.) The MD component will have little or no logging, and the OR will log everything.

OTHER TIPS

You wouldn't want to push everything through one anyways, if one fails everything goes down. Firstly it gives you robustness, if one fails others can carry on. You can balance your loads, some users connect to one, others to another. You can easily re-route users if something fails. Where I work, they usually have a single message bus, which all gateways dump their messages on, and read all messages destined for them. It gives us the flexibility to add as many gateways possible, not to our whims but when required, or when something trips over switch to the back up.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top