The Lab

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The message parsers must consume complete messages one at a time, and in order. However, the TCP protocol delivers only a stream of bytes, possibly segmented differently from the messages. This mismatch in segmentation means that sometimes, Reflector is required to store packets containing partial messages while manufacturing/manipulating TCP ACKs. TCP frames manufactured by
Reflector can be identified by their unusual IPv4ID and TTL values.


Session Termination

Reflector's parser can return error for a variety of reasons: logon fail, wrong protocol, sanity checks, etc. Some exogenous factors can also call for immediate termination: session timeout, disabled credential, UNPLUG mode, etc. The session store executes this directive by generating a pair of TCP RST frames for each affected session.

Session Drop ReasonSourceExecutorRST GeneratedDescription
TCP_FIN_ACKwireSessionStoreNNormal bilateral TCP termination
TCP_RESETwireSessionStoreNUnilateral (client) TCP reset
LOGIN_FAILwireReflector Risk InstanceYLogon credential check failed
PARSE_ERRORwireReflector FIX Message ParserYMessage syntax error
EXPIREDmetronomeSessionStoreYSession heartbeat expired
TRADER_IP_REMOVEDweb serverSessionStoreYAssociated trader IP removed
VENUE_IP_REMOVEDweb serverSessionStoreYAssociated venue IP removed
CREDENTIAL_DISABLEDweb serverReflector Risk InstanceYAssociated credential disabled
GROUP_DISABLEDweb serverReflector Risk InstanceYAssociated risk pool disabled
DEAD_MAN_SWITCHmetronomeReflector Risk InstanceYRisk pool DMS heartbeat expired
SHUTDOWNweb serverReflector Risk InstanceYShutdown command received


Broken Session

If Reflector receives a TCP packet that fits the following requirements, it swallows the packet and generates a TCP RST packet in the reverse direction

  • TCP packet is not part of a BGP session
  • TCP packet cannot be matched to an existing session
  • TCP packet is not an outbound SYN packet


Ethernet Loop Detection

Reflector periodically emits a packet with a custom EtherType and other unique identications. If Reflector captures a packet it has emitted in the opposite direction, it will schedule an orderly shutdown.