Alimentação de dados de baixa latência.
Soluções e sistemas de baixa latência projetados para processar as atualizações do mercado e reverter as ordens em milissegundos em tempo real. Faça uso do software de alimentação de dados fornecido por fornecedores de soluções de baixa latência apresentados no bobsguide para ganhar uma vantagem competitiva no piso comercial.
Kx para Pharma.
Kx para fabricação.
Managed Data Collection Services - Evare.
Dados de mercado de baixa latência e soluções de negociação.
Solução de Análise de Negociação Panopticon.
Exegy X-Port.
Exegy Data Port.
Exegy Ticker Plant.
Exegy Journal Replay.
Exegy Hosted e Managed Solutions.
Conjuntos de dados de eventos corporativos para comerciantes institucionais.
Baixa latência Hosted Exchange / ECN / Liquidity Pool Connectivity.
Manipulação de alimentação direta SMDS.
SuperFeed ™ Consolidated Feed.
iX-Direct & iX-Max - Soluções de dados de mercado.
Insight entregue diariamente para sua caixa de entrada.
Nosso boletim informativo líder no mercado é uma fonte inestimável de notícias, idéias e análises da indústria fintech.
14 de fevereiro de 2017.
4 de dezembro de 2017.
18 de outubro de 2018.
11 de janeiro de 2018.
14 de fevereiro de 2017.
4 de dezembro de 2017.
18 de outubro de 2018.
11 de janeiro de 2018.
Insight entregue diariamente para sua caixa de entrada.
Nosso boletim informativo líder no mercado é uma fonte inestimável de notícias, idéias e análises da indústria fintech.
Insight entregue diariamente para sua caixa de entrada.
Nosso boletim informativo líder no mercado é uma fonte inestimável de notícias, idéias e análises da indústria fintech.
14 de fevereiro de 2017.
4 de dezembro de 2017.
18 de outubro de 2018.
11 de janeiro de 2018.
Conectando compradores e vendedores de tecnologia financeira globalmente.
Parte do Contentive Group Ltd.
Conectando compradores e vendedores de tecnologia financeira globalmente.
Parte do Contentive Group Ltd.
Conectando compradores e vendedores de tecnologia financeira globalmente.
Parte do Contentive Group Ltd.
Anúncios de empresas.
Diretório.
Eventos.
A bobsguide conecta compradores e vendedores de tecnologia financeira globalmente.
Bobsguide atrai mais de 70.000 compradores fintos e vendedores todos os meses. Eles vêm até nós para obter a última visão de nossa plataforma, para obter os melhores fornecedores através do nosso diretório de produtos fintech, para encontrar novos papéis de trabalho emocionantes ou descobrir talentos digitais para seus negócios através de nossas listas de emprego, para saber mais sobre os principais eventos ao vivo e digitais, e para baixar recursos úteis, como whitepapers e estudos de caso.
Sistemas de negociação financeira de baixa latência
Obter através da App Store Leia esta publicação em nosso aplicativo!
Quão rápido são os sistemas de negociação HFT de última geração hoje?
Todo o tempo que você ouve sobre comércio de alta freqüência (HFT) e quão rápido são os algoritmos. Mas estou pensando - o que é rápido nos dias de hoje?
Não estou pensando na latência causada pela distância física entre uma troca e o servidor que executa um aplicativo comercial, mas a latência introduzida pelo próprio programa.
Para ser mais específico: qual é o tempo decorrido dos eventos que chegam no fio em um aplicativo para esse aplicativo, emite um pedido / preço no fio? Isto é, hora do tic-to-trade.
Estamos falando sub-milissegundo? Ou sub-microssegundo?
Como as pessoas conseguem essas latências? Codificação em montagem? FPGAs? Código de C ++ bom e antigo?
Foi recentemente publicado um artigo interessante sobre o ACM, fornecendo muitos detalhes sobre a tecnologia HFT de hoje, que é uma excelente leitura:
Você recebeu excelentes respostas. Há um problema, porém - a maioria das algotrading é um segredo. Você simplesmente não sabe o quão rápido é. Isso vai nos dois sentidos - alguns podem não dizer o quão rápido eles funcionam, porque eles não querem. Outros podem, digamos, "exagerar", por muitas razões (atraindo investidores ou clientes, por um).
Os rumores sobre picossegundos, por exemplo, são bastante escandalosos. 10 nanosegundos e 0,1 nanosegundos são exatamente a mesma coisa, porque o tempo necessário para que a ordem atinja o servidor de negociação seja muito mais do que isso.
E, o mais importante, embora não seja o que você perguntou, se você tentar negociar algorítmicamente, não tente ser mais rápido, tente ser mais inteligente. Eu vi algoritmos muito bons que podem lidar com segundos de latência e ganhar muito dinheiro.
Eu sou o CTO de uma pequena empresa que fabrica e vende sistemas HFT baseados em FPGA. Construindo nossos sistemas no topo do Solarflare Application Onload Engine (AOE), estamos constantemente oferecendo latência de um evento de mercado "interessante" no fio (10Gb / S UDP market data feed de ICE ou CME) para o primeiro byte do mensagem de ordem resultante atingindo o fio na faixa de 750 a 800 nanosegundos (sim, submicosegundo). Nós antecipamos que nossos sistemas de próxima versão estarão na faixa de 704 a 710 nanosegundos. Algumas pessoas reivindicaram um pouco menos, mas isso é em um ambiente de laboratório e na verdade não está sentado em uma COLO em Chicago e limpa as ordens.
Os comentários sobre física e "velocidade da luz" são válidos, mas não relevantes. Todo mundo que é sério sobre a HFT tem seus servidores em um COLO na sala ao lado do servidor da troca.
Para entrar neste domínio sub-microsegundo, você não pode fazer muito na CPU do host, exceto os comandos de implementação da estratégia de alimentação para o FPGA, mesmo com tecnologias como o bypass do kernel você tem 1.5 microssegundos de despesas gerais inevitáveis. então neste domínio tudo está jogando com FPGAs.
Uma das outras respostas é muito honesta ao dizer que, neste mercado altamente secreto, poucas pessoas falam sobre as ferramentas que eles usam ou seu desempenho. Cada um de nossos clientes exige que nem digamos a ninguém que eles usem nossas ferramentas nem divulguem nada sobre como elas as usam. Isso não só dificulta o marketing, mas também evita o bom fluxo de conhecimento técnico entre colegas.
Devido a esta necessidade de entrar em sistemas exóticos para a parte do mercado "wicked fast", você descobrirá que os Quants (as pessoas que aparecem nos algoritmos que fazemos rápido) estão dividindo seus algos em eventos-a - camadas de tempo de resposta. No topo da tecnologia, o heap é o sistema de microsecondos secundários (como o nosso). A próxima camada são os sistemas C ++ personalizados que fazem uso intenso do bypass do kernel e estão na faixa de 3-5 microsegundos. A próxima camada são as pessoas que não podem se dar ao luxo de estar em um fio de 10Gb / S apenas um roteador de lúpulo da "troca", eles podem estar ainda em COLO, mas por causa de um jogo desagradável que chamamos de "roleta de porta" eles estão no dezenas de centenas de microsecondos. Uma vez que você entra em milissegundos, quase não é HFT.
"sub-40 microssegundos", se você quiser acompanhar a Nasdaq. Esta figura é publicada aqui nasdaqomx / technology /
Um bom artigo que descreve o estado do HFT (em 2018) e oferece algumas amostras de soluções de hardware que tornam possível o uso de nanosegundos: as ruas de parede precisam de velocidade de negociação: a era de nanosegundos.
Com a corrida pela menor "latência" continuando, alguns participantes do mercado estão falando sobre picossegundos - trilhões de segundo.
EDIT: Como Nicholas mencionou gentilmente:
O link menciona uma empresa, a Fixnetix, que pode "preparar um comércio" em 740ns (ou seja, o tempo de um evento de entrada ocorre a uma ordem que está sendo enviada).
Para o que vale a pena, o produto de mensagens FTL da TIBCO é sub-500 ns para dentro de uma máquina (memória compartilhada) e alguns micro segundos usando RDMA (Remote Direct Memory Access) dentro de um data center. Depois disso, a física se torna a principal parte da equação.
Então, essa é a velocidade com que os dados podem ser obtidos a partir do feed para o aplicativo que toma decisões.
Pelo menos um sistema reivindicou.
30ns mensagens interthread, que provavelmente é um benchmark tweaked up, então qualquer um que fala sobre números mais baixos está usando algum tipo de CPU mágica.
Uma vez que você está no aplicativo, é apenas uma questão de quão rápido o programa pode tomar decisões.
Hoje em dia, o tic-to-trade de um dígito em microssegundos é a barra para empresas HFT competitivas. Você deve poder fazer dígitos únicos altos usando apenas o software. Então & lt; 5 usec com hardware adicional.
O comércio de alta freqüência ocorreu pelo menos desde 1999, depois que a Bolsa de Valores dos EUA (SEC) autorizou as trocas eletrônicas em 1998. Na virada do século 21, os negócios da HFT tiveram um tempo de execução de vários segundos, enquanto que até 2018 isso diminuiu em milissegundos e até mesmo em microssegundos.
Nunca será inferior a alguns microsegundos, devido ao limite de velocidade de em-w / luz, e apenas um número sortudo, que deve estar em menos de um quilômetro de distância, pode até sonhar em aproximar-se disso.
Além disso, não há codificação, para alcançar essa velocidade, você deve se tornar físico ... (o cara com o artigo com o interruptor 300ns, que é apenas a latência adicional desse switch!, Igual a 90m de viagem através de um óptico e um pouco menos em cobre)
Evolução e prática: aplicativos distribuídos de baixa latência em finanças.
O setor financeiro possui demandas únicas para sistemas distribuídos de baixa latência.
Andrew Brook.
Praticamente todos os sistemas têm alguns requisitos de latência, definidos aqui como o tempo necessário para que um sistema responda à entrada. (Existem cálculos de falta de interrupção, mas têm poucas aplicações práticas). Os requisitos de latência aparecem em domínios problemáticos tão diversos quanto os controles de vôo da aeronave (copter. ardupilot /), comunicações de voz (queue. acm / detail. cfm? Id = 1028895), jogos multijogantes (queue. acm / detail. cfm? id = 971591), publicidade online (acuityads / lances em tempo real /) e experiências científicas (home. web. cern. ch/about/accelerators/cern-neutrinos-gran - sasso).
Sistemas distribuídos e mdash, em que computação ocorre em vários computadores em rede que se comunicam e coordenam suas ações passando mensagens e mensagens; apresentam considerações especiais de latência. Nos últimos anos, a automação do comércio financeiro conduziu os requisitos para sistemas distribuídos com requisitos de latência desafiadores (geralmente medidos em microssegundos ou mesmo nanossegundos, ver tabela 1) e distribuição geográfica global. A negociação automatizada fornece uma janela para os desafios de engenharia dos requisitos de latência em constante encolhimento, o que pode ser útil para engenheiros de software em outros campos.
Este artigo centra-se em aplicações em que a latência (em oposição ao rendimento, eficiência ou alguma outra métrica) é uma das principais considerações de projeto. Fraseado de forma diferente, "sistemas de baixa latência" são aqueles para os quais a latência é a principal medida de sucesso e geralmente é a restrição mais difícil de projetar. O artigo apresenta exemplos de sistemas de baixa latência que ilustram os fatores externos que geram latência e, em seguida, discute algumas abordagens práticas de engenharia para construir sistemas que operam em baixa latência.
Por que todos estão com tanta pressa?
Para entender o impacto da latência em um aplicativo, é importante primeiro entender os fatores externos, do mundo real que impulsionam o requisito. Os exemplos a seguir do setor financeiro ilustram o impacto de alguns fatores do mundo real.
Solicitação de Negociação de Cotações.
Em 2003, trabalhei em um grande banco que acabava de implantar um novo sistema de comércio de moeda estrangeira institucional baseado na Web. O mecanismo de citação e comércio, um aplicativo J2EE (Java 2 Platform, Enterprise Edition) executado em um servidor WebLogic em cima de um banco de dados Oracle, teve tempos de resposta confiáveis em menos de dois segundos e rápido, para garantir uma boa experiência do usuário.
Ao mesmo tempo que o site do banco entrou em operação, foi lançada uma plataforma multibanca de negociação on-line. Nesta nova plataforma, um cliente apresentaria um pedido de pedido (pedido de cotação) que seria encaminhado para vários bancos participantes. Cada banco responderia com uma cotação, e o cliente escolheria qual aceitação.
Meu banco iniciou um projeto para se conectar à nova plataforma multibanco. O raciocínio era que, uma vez que um tempo de resposta de dois segundos era bom o suficiente para um usuário no site, ele deveria ser bom o suficiente para a nova plataforma e, assim, o mesmo mecanismo de negociação e troca poderia ser reutilizado. Poucas semanas depois de viver, o banco estava ganhando uma porcentagem surpreendentemente pequena de PDOs. A causa raiz foi a latência. Quando dois bancos responderam com o mesmo preço (o que aconteceu com bastante freqüência), a primeira resposta foi exibida no topo da lista. A maioria dos clientes esperou para ver algumas cotações diferentes e, em seguida, clicou em uma na parte superior da lista. O resultado foi que o banco mais rápido geralmente ganhou o negócio do cliente e o meu banco não era o mais rápido.
A parte mais lenta do processo de geração de cotações ocorreu nas consultas do banco de dados ao carregar parâmetros de preços de clientes. Adicionar um cache ao mecanismo de cotação e otimizar alguns outros "hot spots" no código trouxe a latência das cotações para o intervalo de aproximadamente 100 milissegundos. Com um mecanismo mais rápido, o banco conseguiu capturar uma participação de mercado significativa na plataforma de cotação competitiva, mas o mercado continuou a evoluir.
Citações de transmissão.
Em 2006, um novo estilo de troca de moeda estava se tornando popular. Em vez de um cliente enviar um pedido específico e o banco responder com uma cotação, os clientes queriam que os bancos enviassem um fluxo contínuo de cotações. Esse estilo de negociação de citações de streaming foi especialmente popular com certos fundos de hedge que estavam desenvolvendo estratégias de negociação automatizadas e aplicações que receberiam fluxos de cotações de vários bancos e decidirão automaticamente quando negociar. Em muitos casos, os humanos já estavam fora de linha em ambos os lados do comércio.
Para entender esta nova dinâmica competitiva, é importante saber como os bancos calculam as taxas que cobram seus clientes por transações cambiais. Os maiores bancos trocam moedas entre si no chamado mercado interbancário. As taxas de câmbio estabelecidas nesse mercado são as mais competitivas e constituem a base das taxas (mais algumas margens) que são oferecidas aos clientes. Toda vez que a taxa interbancária muda, cada banco recompõe e republica as cotações da taxa de clientes correspondentes. Se um cliente aceita uma cotação (ou seja, pedidos de troca contra uma taxa de câmbio cotada), o banco pode executar imediatamente um comércio de compensação com o mercado interbancário, minimizando o risco e bloqueando um pequeno lucro. Há, no entanto, riscos para os bancos que estão lentos para atualizar suas cotações. Um exemplo simples pode ilustrar:
Imagine que o mercado spot interbancário para EUR / USD tem taxas de 1.3558 / 1.3560. (O prazo significa que as moedas acordadas devem ser trocadas dentro de dois dias úteis. As moedas podem ser negociadas para entrega em qualquer data mutuamente acordada no futuro, mas o mercado spot é o mais ativo em termos de número de trades.) Duas taxas são cotadas: uma para comprar (a taxa de compra) e outra para venda (a taxa oferecida ou a taxa). Nesse caso, um participante no mercado interbancário poderia vender um euro e receber 1,3558 dólares em contrapartida. Por outro lado, pode-se comprar um euro por um preço de 1.3560 dólares.
Digamos que dois bancos, A e B, são participantes no mercado interbancário e estão publicando cotações para o mesmo cliente de hedge funds, C. Ambos os bancos adicionam uma margem de 0.0001 às taxas de câmbio que citam aos clientes e mdash; 1.3557 / 1.3561 ao cliente C. O Bank A, no entanto, é mais rápido em atualizar suas cotações do que o banco B, levando cerca de 50 milissegundos, enquanto o banco B leva cerca de 250 milissegundos. Há aproximadamente 50 milissegundos de latência de rede entre os bancos A e B e seu cliente mútuo C. Ambos os bancos A e B demoram cerca de 10 milissegundos para reconhecer uma ordem, enquanto o fundo de hedge C leva cerca de 10 milissegundos para avaliar novas cotações e enviar ordens. A Tabela 2 divide a sequência de eventos.
O efeito líquido deste novo estilo de negociação de transmissão foi que qualquer banco que era significativamente mais lento do que seus rivais provavelmente sofreria perdas quando os preços de mercado mudaram e suas cotações não foram atualizadas com rapidez suficiente. Ao mesmo tempo, os bancos que poderiam atualizar suas citações mais rapidamente obtiveram lucros significativos. A latência não era apenas um fator de eficiência operacional ou de participação no mercado, afetando diretamente o lucro e a perda da mesa de negociação. À medida que o volume e a velocidade de negociação aumentaram ao longo de meados da década de 2000, esses lucros e perdas cresceram bastante. (Quão baixo você pode ir? A Tabela 3 mostra alguns exemplos de latências aproximadas de sistemas e aplicações em nove ordens de grandeza.)
Para melhorar sua latência, meu banco dividiu seu mecanismo de negociação e negociação em aplicações distintas e reescreveu o mecanismo de cotação em C ++. Os pequenos atrasos adicionados por cada lúpulo na rede desde o mercado interbancário até o banco e em diante para seus clientes foram agora significativos, de modo que o banco atualizou firewalls e adquiriu circuitos dedicados de telecomunicações. As atualizações de rede combinadas com o mecanismo de cotações mais rápido trouxeram latência de cotação de ponta a ponta abaixo de 10 milissegundos para clientes que estavam fisicamente localizados perto de nossas instalações em Nova York, Londres ou Hong Kong. O desempenho comercial e os lucros subiram de acordo com o mercado, mas, é claro, o mercado continuou evoluindo.
Sistemas de engenharia para baixa latência.
Os requisitos de latência de um determinado aplicativo podem ser abordados de várias maneiras, e cada problema requer uma solução diferente. No entanto, existem alguns temas comuns. Primeiro, geralmente é necessário medir a latência antes de poder ser melhorado. Em segundo lugar, a otimização muitas vezes requer olhar abaixo das camadas de abstração e se adaptar à realidade da infra-estrutura física. Finalmente, às vezes é possível reestruturar os algoritmos (ou mesmo a própria definição do problema) para alcançar baixa latência.
Mentiras, malditas mentiras e estatísticas.
O primeiro passo para resolver a maioria dos problemas de otimização (e não apenas aqueles que envolvem software) é medir o desempenho do sistema atual. Comece do nível mais alto e mede a latência de ponta a ponta. Em seguida, mede a latência de cada componente ou estágio de processamento. Se algum estágio está tomando uma porção excepcionalmente grande da latência, então divida-o ainda mais e mede a latência de suas sub-etapas. O objetivo é encontrar as partes do sistema que mais contribuem para a latência total e esforços de otimização de foco lá. Isso não é sempre direto na prática, no entanto.
Por exemplo, imagine um aplicativo que responda aos pedidos de cotação do cliente recebidos em uma rede. O cliente envia 100 solicitações de cotação em rápida sucessão (o próximo pedido é enviado assim que a resposta anterior é recebida) e informa o tempo total decorrido de 360 milissegundos e mdash, ou 3,6 milissegundos em média para atender uma solicitação. Os internos do aplicativo são divididos e medidos usando o mesmo conjunto de teste de 100 citações:
&touro; Leia a mensagem de entrada da rede e analise - 5 microssegundos.
&touro; Procure o perfil do cliente - 3.2 milissegundos (3.200 microssegundos)
&touro; Calcule o orçamento do cliente - 15 microssegundos.
&touro; Cotação do registro - 20 microssegundos.
&touro; Serialize citar uma mensagem de resposta - 5 microssegundos.
&touro; Escreva na rede - 5 microssegundos.
Conforme demonstrado claramente neste exemplo, reduzir significativamente a latência significa abordar o tempo necessário para procurar o perfil do cliente. Uma rápida inspeção mostra que o perfil do cliente é carregado a partir de um banco de dados e armazenado em cache localmente. Outros testes mostram que quando o perfil está no cache local (uma tabela de hash simples), o tempo de resposta geralmente está em um microssegundo, mas quando o cache é faltado, leva vários centenas de milissegundos para carregar o perfil. A média de 3,2 milissegundos foi quase inteiramente o resultado de uma resposta muito lenta (de cerca de 320 milissegundos) causada por uma falta de cache. Do mesmo modo, o tempo médio de resposta de 3.6 milhas de segundo do cliente revela-se uma única resposta muito lenta (350 milissegundos) e 99 respostas rápidas que levaram cerca de 100 microsegundos cada.
Meios e outliers.
A maioria dos sistemas exibe alguma variação em latência de um evento para o outro. Em alguns casos, a variação (e especialmente os valores atípicos de maior latência) impulsiona o projeto, muito mais do que o caso médio. É importante entender qual a medida estatística de latência é apropriada ao problema específico. Por exemplo, se você estiver construindo um sistema de negociação que ganhe pequenos lucros quando a latência estiver abaixo de um limiar, mas incorre em perdas maciças quando a latência ultrapasse esse limite, então você deve medir a latência máxima (ou, alternativamente, a porcentagem de pedidos que excedem o limiar) em vez da média. Por outro lado, se o valor do sistema for mais ou menos inversamente proporcional à latência, então, medindo (e otimizando) a latência média faz mais sentido, mesmo que isso signifique que existem alguns valores abertos de grande porte.
O que você está medindo?
Leitores astutos podem ter percebido que a latência medida dentro do aplicativo do servidor de citação não se resume bastante à latência relatada pelo aplicativo cliente. Isso é muito provável porque eles não estão realmente medindo o mesmo. Considere o seguinte pseudocódigo simplificado:
(No aplicativo cliente)
para (int i = 0; i & lt; 100; i ++)
RequestMessage requestMessage = new RequestMessage (quoteRequest);
Long SentTime = getSystemTime ();
ResponseMessage responseMessage = receiveMessage ();
long quoteLatency = getSystemTime () - sentTime;
(No aplicativo do servidor de citação)
RequestMessage requestMessage = receive ();
Long ReceiveTime = getSystemTime ();
QuoteRequest quoteRequest = parseRequest (requestMessage);
Long ParseTime = getSystemTime ();
long parseLatency = parseTime - recebidoTime;
Perfil ClientProfile = lookupClientProfile (quoteRequest. client);
long profileTime = getSystemTime ();
long profileLatency = profileTime - parseTime;
Quote quote = computeQuote (perfil);
Long computeTime = getSystemTime ();
long computeLatency = computeTime - profileTime;
logTime longo = getSystemTime ();
logLatency longo = logTime - computeTime;
QuoteMessage quoteMessage = new QuoteMessage (quote);
longo serializeTime = getSystemTime ();
serializationLatency longo = serializeTime - logTime;
Long SentTime = getSystemTime ();
Long SendLatency = sentTime - serializeTime;
logStats (parseLatency, profileLatency, computeLatency,
logLatency, serializationLatency, sendLatency);
Observe que o tempo decorrido medido pelo aplicativo cliente inclui o tempo para transmitir a solicitação através da rede, bem como o tempo para a resposta ser transmitida de volta. O servidor de citação, por outro lado, mede o tempo decorrido apenas da chegada da citação para quando é enviado (ou mais precisamente, quando o método de envio retorna). A discrepância de 350 microsecondes entre o tempo médio de resposta medido pelo cliente e a medição equivalente pelo servidor de cotação pode ser causada pela rede, mas também pode ser o resultado de atrasos no cliente ou no servidor. Além disso, dependendo da linguagem de programação e do sistema operacional, verificar o relógio do sistema e registrar as estatísticas de latência podem introduzir atrasos de material.
Essa abordagem é simplista, mas quando combinada com ferramentas de criação de código para encontrar o código mais comumente executado e a contenção de recursos, geralmente é bom identificar as primeiras metas (e muitas vezes as mais fáceis) para a otimização de latência. No entanto, é importante manter essa limitação em mente.
Medição da latência dos sistemas distribuídos através da captura de tráfego na rede.
Os sistemas distribuídos representam alguns desafios adicionais para a medição de latência, bem como algumas oportunidades. Nos casos em que o sistema é distribuído em vários servidores, pode ser difícil correlacionar timestamps de eventos relacionados. A própria rede pode ser um contribuinte significativo para a latência do sistema. O middleware de mensagens e as pilhas de rede de sistemas operacionais podem ser fontes complexas de latência.
Ao mesmo tempo, a decomposição do sistema geral em processos separados em servidores independentes pode facilitar a medição de certas interações com precisão entre os componentes do sistema através da rede. Muitos dispositivos de rede (como switches e roteadores) fornecem mecanismos para fazer cópias timestamped dos dados que atravessam o dispositivo com um impacto mínimo sobre o desempenho do dispositivo. A maioria dos sistemas operacionais oferece recursos semelhantes em software, embora com um risco um pouco maior de atrasar o tráfego real. As capturas de tráfego de rede Timestamped (geralmente chamadas de captura de pacotes) podem ser uma ferramenta útil para medir com mais precisão quando uma mensagem foi trocada entre duas partes do sistema. Essas medidas podem ser obtidas sem modificar o próprio aplicativo e geralmente com muito pouco impacto sobre o desempenho do sistema como um todo. (Veja wireshark e tcpdump.)
Um dos desafios de medir o desempenho em baixas escalas nos sistemas distribuídos é a sincronização do relógio. Em geral, para medir o tempo decorrido quando uma aplicação no servidor A transmite uma mensagem para quando a mensagem chega a uma segunda aplicação no servidor B, é necessário verificar a hora no relógio de A quando a mensagem é enviada e no relógio de B quando o texto chega, e depois resta as duas marcas de tempo para determinar a latência. Se os relógios em A e B não estiverem em sincronia, então a latência calculada será realmente a latência real mais a inclinação do relógio entre A e B.
Quando isso é um problema no mundo real? As taxas de deriva do mundo real para os osciladores de quartzo que são usados na maioria das placas-mãe do servidor de commodities são da ordem de 10 ^ -5, o que significa que o oscilador pode ser esperado para drift em 10 microssegundos por segundo. Se não corrigido, pode ganhar ou perder tanto quanto um segundo ao longo de um dia. Para sistemas que operam em escalas de tempo de milissegundos ou menos, a inclinação do relógio pode tornar a latência medida sem sentido. Os osciladores com taxas de deriva significativamente menores estão disponíveis, mas sem alguma forma de sincronização, eles acabarão por se afastar. É necessário algum mecanismo para colocar o relógio local de cada servidor em alinhamento com algum tempo de referência comum.
Os desenvolvedores de sistemas distribuídos devem entender NTP (Network Time Protocol) no mínimo e são encorajados a conhecer o PTP (Precision Time Protocol) e o uso de sinais externos, como o GPS, para obter sincronização de tempo de alta precisão na prática. Aqueles que precisam de precisão de tempo na escala de microssegundos devem querer se familiarizar com implementações de hardware de PTP (especialmente na interface de rede), bem como ferramentas para extrair informações de tempo do relógio local de cada núcleo. (Veja tools. ietf / html / rfc1305, tools. ietf / html / rfc5905, nist. gov/el/isd/ieee/ieee1588.cfm e queue. acm / detail. cfm? Id = 2354406.)
Abstração versus Realidade.
A engenharia de software moderno é construída com base em abstrações que permitem aos programadores gerenciar a complexidade de sistemas cada vez maiores. As abstrações fazem isso simplificando ou generalizando algum aspecto do sistema subjacente. Isso não vem de graça, embora a simplificação seja um processo inerentemente com perdas e alguns dos detalhes perdidos podem ser importantes. Além disso, as abstrações são muitas vezes definidas em termos de função e não de desempenho.
Em algum lugar abaixo de uma aplicação são correntes elétricas fluindo através de semicondutores e pulsos de luz que viajam para baixo fibras. Os programadores raramente precisam pensar em seus sistemas nesses termos, mas, se sua visão conceitualizada se afastar muito da realidade, é provável que surjam surpresas desagradáveis.
Quatro exemplos ilustram este ponto:
&touro; TCP fornece uma abstração útil sobre UDP (User Datagram Protocol) em termos de entrega de uma seqüência de bytes. O TCP garante que os bytes serão entregues na ordem em que foram enviados, mesmo que alguns datagramas UDP subjacentes sejam perdidos. A latência de transmissão de cada byte (o tempo desde que é gravado em um soquete TCP no aplicativo de envio até que seja lido no soquete do aplicativo de recepção correspondente) não está garantida, no entanto. Em certos casos (especificamente quando um datagrama interativo é perdido), os dados contidos em um determinado datagrama UDP podem ser atrasados significativamente desde a entrega até o aplicativo, enquanto os dados perdidos à frente são recuperados.
&touro; Cloud hosting fornece servidores virtuais que podem ser criados sob demanda sem controle preciso sobre a localização do hardware. Um aplicativo ou administrador pode criar um novo servidor virtual "na nuvem" em menos de um minuto e mdash, um feito impossível ao montar e instalar hardware físico em um data center. Ao contrário do servidor físico, no entanto, a localização do servidor da nuvem ou sua localização na topologia da rede pode não ser precisamente conhecida. Se um aplicativo distribuído depende da troca rápida de mensagens entre servidores, a proximidade física desses servidores pode ter um impacto significativo no desempenho geral do aplicativo.
&touro; Os tópicos permitem que os desenvolvedores decomponham um problema em seqüências separadas de instruções que podem ser executadas simultaneamente, sujeitas a determinadas restrições de pedidos e que podem operar em recursos compartilhados (como memória). Isso permite que os desenvolvedores aproveitem os processadores multicore sem precisar lidar diretamente com problemas de agendamento e atribuição de núcleo. Em alguns casos, no entanto, a sobrecarga do contexto muda e a passagem de dados entre núcleos pode superar as vantagens obtidas pela concorrência.
&touro; O armazenamento hierárquico e os protocolos de coerência de cache permitem aos programadores escrever aplicativos que usam grandes quantidades de memória virtual (na ordem dos terabytes em servidores de commodities modernos), enquanto experimentam latências medidas em nanosegundos quando as solicitações podem ser atendidas pelos caches mais próximos. A abstração esconde o fato de que a memória mais rápida é de capacidade muito limitada (por exemplo, registrar arquivos na ordem de alguns kilobytes), enquanto a memória que foi trocada para o disco pode sofrer latências em dezenas de milissegundos.
Cada uma dessas abstrações é extremamente útil, mas pode ter consequências imprevistas para aplicações de baixa latência. Existem algumas etapas práticas a serem tomadas para identificar e mitigar os problemas de latência resultantes dessas abstrações.
Mensagens e protocolos de rede.
A ubiqüidade próxima das redes baseadas em IP significa que, independentemente de qual produto de mensagens esteja em uso, sob as capas, os dados estão sendo transmitidos pela rede como uma série de pacotes discretos. As características de desempenho da rede e as necessidades de um aplicativo podem variar drasticamente & mdash; portanto, um tamanho quase certamente não cabe a todos quando se trata de middleware de mensagens para sistemas distribuídos sensíveis à latência.
Não há substituto para entrar no capô aqui. Por exemplo, se um aplicativo é executado em uma rede privada (você controla o hardware), as comunicações seguem um modelo de editor / assinante e o aplicativo pode tolerar uma certa taxa de perda de dados, então o multicast bruto pode oferecer ganhos de desempenho significativos em relação a qualquer middleware no TCP. Se um aplicativo é distribuído em distâncias muito longas e a ordem dos dados não é importante, então um protocolo baseado em UDP pode oferecer vantagens em termos de não atrasar reenviar um pacote faltado. Se a mensagem baseada em TCP estiver sendo utilizada, vale a pena ter em mente que muitos dos seus parâmetros (especialmente os tamanhos do buffer, o início lento e o algoritmo de Nagle) são configuráveis e as configurações "out-of-the-box" geralmente são otimizadas para taxa de transferência em vez de latência (queue. acm / detail. cfm? id = 2539132).
A restrição física que a informação não pode propagar mais rapidamente do que a velocidade da luz é uma consideração muito real ao lidar com escalas de tempo curto e / ou longas distâncias. As duas maiores bolsas de valores, NASDAQ e NYSE, executam seus mecanismos de correspondência em centros de dados em Carteret e Mahwah, Nova Jersey, respectivamente. Um raio de luz leva 185 microssegundos para percorrer a distância de 55,4 km entre esses dois locais. A luz em uma fibra de vidro com um índice de refração de 1.6 e seguindo um caminho ligeiramente mais longo (aproximadamente 65 km) leva quase 350 microssegundos para fazer a mesma viagem unidirecional. Dado que os cálculos envolvidos nas decisões de negociação agora podem ser feitos em escalas de tempo de 10 microssegundos ou menos, a latência de propagação do sinal não pode ser ignorada.
Descompactar um problema em uma série de threads que podem ser executados simultaneamente podem aumentar significativamente o desempenho, especialmente em sistemas multicore, mas em alguns casos pode ser mais lento do que uma solução de um único segmento.
Especificamente, o código multi-thread incorre em despesas gerais das três maneiras a seguir:
&touro; Quando vários segmentos operam nos mesmos dados, os controles são necessários para garantir que os dados permaneçam consistentes. Isso pode incluir a aquisição de bloqueios ou implementações de barreiras de leitura ou gravação. Em sistemas multicore, esses controles de concorrência exigem que a execução do segmento seja suspensa enquanto as mensagens são passadas entre os núcleos. Se um bloqueio já for mantido por um segmento, outros fios que procuram esse bloqueio precisarão aguardar até que o primeiro seja concluído. Se vários segmentos freqüentemente estão acessando os mesmos dados, pode haver contenção significativa para bloqueios.
&touro; Da mesma forma, quando vários threads operam nos mesmos dados, os dados em si devem ser passados entre os núcleos. Se vários tópicos acessam os mesmos dados, mas cada um executa apenas alguns cálculos, o tempo necessário para mover os dados entre os núcleos pode exceder o tempo gasto em operação.
&touro; Finalmente, se houver mais threads do que núcleos, o sistema operacional deve executar periodicamente um interruptor de contexto no qual o segmento que está sendo executado em um determinado núcleo é interrompido, seu estado é salvo e outro segmento pode ser executado. O custo de uma mudança de contexto pode ser significativo. Se o número de threads ultrapassar largamente o número de núcleos, a mudança de contexto pode ser uma fonte significativa de atraso.
Em geral, o design do aplicativo deve usar os segmentos de uma maneira que represente a concorrência inerente do problema subjacente. Se o problema contiver cálculos significativos que podem ser realizados de forma isolada, é necessário um número maior de threads. Por outro lado, se houver um alto grau de interdependência entre cálculos ou (o pior dos casos) se o problema for inerentemente serial, então uma solução de um único segmento pode ter mais sentido. Em ambos os casos, ferramentas de perfil devem ser usadas para identificar contenção de bloqueio excessiva ou mudança de contexto. As estruturas de dados sem bloqueio (agora disponíveis para várias linguagens de programação) são outra alternativa a considerar (queue. acm / detail. cfm? Id = 2492433).
Também vale a pena notar que o arranjo físico de núcleos, memória e E / S pode não ser uniforme. Por exemplo, nos microprocessadores modernos da Intel, certos núcleos podem interagir com E / S externas (por exemplo, interfaces de rede) com latência muito menor que outras, e a troca de dados entre determinados núcleos é mais rápida do que outras. Como resultado, pode ser vantajoso explicitamente pino de threads específicos para núcleos específicos (queue. acm / detail. cfm? Id = 2513149).
Armazenamento hierárquico e falta de cache.
Todos os sistemas de computação modernos usam armazenamento de dados hierárquico e mdash, uma pequena quantidade de memória rápida combinada com vários níveis de memória maior (mas mais lenta). Os dados acessados recentemente são armazenados em cache de modo que o acesso subsequente seja mais rápido. Como a maioria das aplicações exibe uma tendência para acessar a mesma memória várias vezes em um curto período, isso pode aumentar consideravelmente o desempenho. Para obter o máximo benefício, no entanto, os seguintes três fatores devem ser incorporados no design do aplicativo:
&touro; Usar menos memória em geral (ou pelo menos nas partes do aplicativo que são sensíveis à latência) aumenta a probabilidade de que os dados necessários estejam disponíveis em um dos caches. Em particular, para aplicações particularmente sensíveis à latência, projetar o aplicativo para que os dados com acesso frequente se encaixem nos caches da CPU podem melhorar significativamente o desempenho. As especificações variam, mas os microprocessadores Haswell da Intel, por exemplo, fornecem 32 KB por núcleo para cache de dados L1 e até 40 MB de cache L3 compartilhado para toda a CPU.
&touro; A alocação repetida e a liberação de memória devem ser evitadas se a reutilização for possível. Um objeto ou estrutura de dados que é alocado uma vez e reutilizado tem uma chance muito maior de estar presente em um cache do que aquele que é repetidamente alocado de novo. Isto é especialmente verdadeiro quando se desenvolve em ambientes onde a memória é gerenciada automaticamente, pois a sobrecarga causada pela coleta de lixo da memória que é liberada pode ser significativa.
&touro; O layout das estruturas de dados na memória pode ter um impacto significativo no desempenho devido à arquitetura de caches em processadores modernos. Embora os detalhes variem de acordo com a plataforma e estão fora do escopo deste artigo, geralmente é uma boa idéia preferir arrays como estruturas de dados sobre listas e árvores vinculadas e preferir algoritmos que acessam a memória sequencialmente, pois estes permitem o prefetador de hardware (que tenta carregar dados de forma prévia da memória principal para o cache antes de ser solicitado pelo aplicativo) para operar de forma mais eficiente. Observe também que os dados que serão operados simultaneamente por diferentes núcleos devem ser estruturados de modo que não seja provável que caia na mesma linha de cache (as últimas CPUs da Intel usam linhas de cache de 64 bytes) para evitar a contenção de coerência de cache.
Uma nota sobre otimização prematura.
As otimizações que acabamos de apresentar devem ser consideradas parte de um processo de design mais amplo que leva em consideração outros objetivos importantes, incluindo correção funcional, manutenção, etc. Tenha em mente que a citação de Knuth sobre a otimização prematura é a raiz de todo o mal; mesmo nos ambientes mais sensíveis ao desempenho, é raro que um programador se preocupe em determinar o número correto de threads ou a estrutura de dados ótima até que medidas empíricas indiquem que uma parte específica do aplicativo é um hot spot. O foco em vez disso deve ser garantir que os requisitos de desempenho sejam entendidos no início do processo de design e que a arquitetura do sistema seja suficientemente decomposável para permitir a medição detalhada de latência quando e como otimização se torna necessária. Além disso (e como discutido na próxima seção), as otimizações mais úteis podem não estar no código do aplicativo.
Mudanças no Design.
As otimizações apresentadas até agora foram limitadas a melhorar o desempenho de um sistema para um determinado conjunto de requisitos funcionais. Também pode haver oportunidades de mudar o design mais amplo do sistema ou mesmo mudar os requisitos funcionais do sistema de uma forma que ainda atenda aos objetivos gerais, mas melhora significativamente o desempenho. A otimização de latência não é uma exceção. Em particular, muitas vezes há oportunidades para trocar eficiência reduzida por latência melhorada.
Três exemplos reais de compensações de design entre eficiência e latência são apresentados aqui, seguidos de um exemplo em que os próprios requisitos apresentam a melhor oportunidade de redesenhar.
Em certos casos, a eficiência comercial para a latência pode ser possível, especialmente em sistemas que funcionam bem abaixo da sua capacidade máxima. Em particular, pode ser vantajoso calcular as saídas possíveis antecipadamente, especialmente quando o sistema está ocioso na maioria das vezes, mas deve reagir rapidamente quando uma entrada chega.
Um exemplo do mundo real pode ser encontrado nos sistemas usados por algumas empresas para negociar ações com base em notícias como anúncios de ganhos. Imagine that the market expects Apple to earn between $9.45 and $12.51 per share. The goal of the trading system, upon receiving Apple's actual earnings, would be to sell some number of shares Apple stock if the earnings were below $9.45, buy some number of shares if the earnings were above $12.51, and do nothing if the earnings fall within the expected range. The act of buying or selling stocks begins with submitting an order to the exchange. The order consists of (among other things) an indicator of whether the client wishes to buy or sell, the identifier of the stock to buy or sell, the number of shares desired, and the price at which the client wishes to buy or sell. Throughout the afternoon leading up to Apple's announcement, the client would receive a steady stream of market-data messages that indicate the current price at which Apple's stock is trading.
A conventional implementation of this trading system would cache the market-price data and, upon receipt of the earnings data, decide whether to buy or sell (or neither), construct an order, and serialize that order to an array of bytes to be placed into the payload of a message and sent to the exchange.
An alternative implementation performs most of the same steps but does so on every market-data update rather than only upon receipt of the earnings data. Specifically, when each market-data update message is received, the application constructs two new orders (one to buy, one to sell) at the current prices and serializes each order into a message. The messages are cached but not sent. When the next market-data update arrives, the old order messages are discarded and new ones are created. When the earnings data arrives, the application simply decides which (if either) of the order messages to send.
The first implementation is clearly more efficient (it has a lot less wasted computation), but at the moment when latency matters most (i. e., when the earnings data has been received), the second algorithm is able to send out the appropriate order message sooner. Note that this example presents application-level precomputation; there is an analogous process of branch prediction that takes place in pipelined processors which can also be optimized (via guided profiling) but is outside the scope of this article.
Keeping the system warm.
In some low-latency systems long delays may occur between inputs. During these idle periods, the system may grow "cold." Critical instructions and data may be evicted from caches (costing hundreds of nanoseconds to reload), threads that would process the latency-sensitive input are context-switched out (costing tens of microseconds to resume), CPUs may switch into power-saving states (costing a few milliseconds to exit), etc. Each of these steps makes sense from an efficiency standpoint (why run a CPU at full power when nothing is happening?), but all of them impose latency penalties when the input data arrives.
In cases where the system may go for hours or days between input events there is a potential operational issue as well: configuration or environmental changes may have "broken" the system in some important way that won't be discovered until the event occurs—when it's too late to fix.
A common solution to both problems is to generate a continuous stream of dummy input data to keep the system "warm." The dummy data needs to be as realistic as possible to ensure that it keeps the right data in the caches and that breaking changes to the environment are detected. The dummy data needs to be reliably distinguishable from legitimate data, though, to prevent downstream systems or clients from being confused.
It is common in many systems to process the same data through multiple independent instances of the system in parallel, primarily for the improved resiliency that is conferred. If some component fails, the user will still receive the result needed. Low-latency systems gain the same resiliency benefits of parallel, redundant processing but can also use this approach to reduce certain kinds of variable latency.
All real-world computational processes of nontrivial complexity have some variance in latency even when the input data is the same. These variations can be caused by minute differences in thread scheduling, explicitly randomized behaviors such as Ethernet's exponential back-off algorithm, or other unpredictable factors. Some of these variations can be quite large: page faults, garbage collections, network congestion, etc., can all cause occasional delays that are several orders of magnitude larger than the typical processing latency for the same input.
Running multiple, independent instances of the system, combined with a protocol that allows the end recipient to accept the first result produced and discard subsequent redundant copies, both provides the benefit of less-frequent outages and avoids some of the larger delays.
Stream processing and short circuits.
Consider a news analytics system whose requirements are understood to be "build an application that can extract corporate earnings data from a press release document as quickly as possible." Separately, it was specified that the press releases would be pushed to the system via FTP. The system was thus designed as two applications: one that received the document via FTP, and a second that parsed the document and extracted the earnings data. In the first version of this system, an open-source FTP server was used as the first application, and the second application (the parser) assumed that it would receive a fully formed document as input, so it did not start parsing the document until it had fully arrived.
Measuring the performance of the system showed that while parsing was typically completed in just a few milliseconds, receiving the document via FTP could take tens of milliseconds from the arrival of the first packet to the arrival of the last packet. Moreover, the earnings data was often present in the first paragraph of the document.
In a multistep process it may be possible for subsequent stages to start processing before prior stages have finished, sometimes referred to as stream-oriented or pipelined processing . This can be especially useful if the output can be computed from a partial input. Taking this into account, the developers reconceived their overall objective as "build a system that can deliver earnings data to the client as quickly as possible." This broader objective, combined with the understanding that the press release would arrive via FTP and that it was possible to extract the earnings data from the first part of the document (i. e., before the rest of the document had arrived), led to a redesign of the system.
The FTP server was rewritten to forward portions of the document to the parser as they arrived rather than wait for the entire document. Likewise, the parser was rewritten to operate on a stream of incoming data rather than on a single document. The result was that in many cases the earnings data could be extracted within just a few milliseconds of the start of the arrival of the document. This reduced overall latency (as observed by the client) by several tens of milliseconds without the internal implementation of the parsing algorithm being any faster.
Conclusão.
While latency requirements are common to a wide array of software applications, the financial trading industry and the segment of the news media that supplies it with data have an especially competitive ecosystem that produces challenging demands for low-latency distributed systems.
As with most engineering problems, building effective low-latency distributed systems starts with having a clear understanding of the problem. The next step is measuring actual performance and then, where necessary, making improvements. In this domain, improvements often require some combination of digging below the surface of common software abstractions and trading some degree of efficiency for improved latency.
LOVE IT, HATE IT? LET US KNOW.
Andrew Brook is the CTO of Selerity, a provider of realtime news, data, and content analytics. Previously he led development of electronic currency trading systems at two large investment banks and launched a pre-dot-com startup to deliver AI-powered scheduling software to agile manufacturers. His expertise lies in applying distributed, realtime systems technology and data science to real-world business problems. He finds Wireshark to be more interesting than PowerPoint.
&cópia de; 2018 ACM 1542-7730/14/0300 $10.00.
An apostate's opinion.
Ivan Beschastnikh, Patty Wang, Yuriy Brun, Michael D, Ernst - Debugging Distributed Systems.
Challenges and options for validation and debugging.
The accepted wisdom does not always hold true.
Lunchtime doubly so. - Ford Prefect to Arthur Dent in "The Hitchhiker's Guide to the Galaxy", by Douglas Adams.
Elios | Sat, 07 Nov 2018 09:29:52 UTC.
Thanks for the nice post. That's a great sum-up of problems in the design and implementation of distributed low latency systems.
I'm working on a distributed low-latency market data distribution system. In this system, one of the biggest challenge is how to measure its latency which is supposed to be several micro seconds.
In our previous system, the latency is measured in an end-to-end manner. We take timestamp in milli seconds on both publisher and subscriber side and record the difference between them. This works but we are aware that the result is not accurate because even with servers having clock synchronized with NTP, users complain sometimes that negative latency is observed.
Given we are reducing the latency to micro seconds, the end-to-end measurement seems to be too limited (it should be better with PTP but we can't force our users to support PTP in their infrastructure) and thus we are trying to get a round-trip latency. However, I can see immediately several cons with this method :
- extra complexity to configure and implement the system because we need to ensure two-way communication. - we can't deduce the end-to-end latency from the round trip one because the loads on both direction are not the same. (we want to send only some probes and get them back)
Do you have some experiences on the round-trip latency measurement and if so could you please share some best practices ?
Trading Floor Architecture.
Available Languages.
Download Options.
View with Adobe Reader on a variety of devices.
Índice.
Trading Floor Architecture.
Executive Overview.
Increased competition, higher market data volume, and new regulatory demands are some of the driving forces behind industry changes. Firms are trying to maintain their competitive edge by constantly changing their trading strategies and increasing the speed of trading.
A viable architecture has to include the latest technologies from both network and application domains. It has to be modular to provide a manageable path to evolve each component with minimal disruption to the overall system. Therefore the architecture proposed by this paper is based on a services framework. We examine services such as ultra-low latency messaging, latency monitoring, multicast, computing, storage, data and application virtualization, trading resiliency, trading mobility, and thin client.
The solution to the complex requirements of the next-generation trading platform must be built with a holistic mindset, crossing the boundaries of traditional silos like business and technology or applications and networking.
This document's main goal is to provide guidelines for building an ultra-low latency trading platform while optimizing the raw throughput and message rate for both market data and FIX trading orders.
To achieve this, we are proposing the following latency reduction technologies:
• High speed inter-connect—InfiniBand or 10 Gbps connectivity for the trading cluster.
• High-speed messaging bus.
• Application acceleration via RDMA without application re-code.
• Real-time latency monitoring and re-direction of trading traffic to the path with minimum latency.
Industry Trends and Challenges.
Next-generation trading architectures have to respond to increased demands for speed, volume, and efficiency. For example, the volume of options market data is expected to double after the introduction of options penny trading in 2007. There are also regulatory demands for best execution, which require handling price updates at rates that approach 1M msg/sec. for exchanges. They also require visibility into the freshness of the data and proof that the client got the best possible execution.
In the short term, speed of trading and innovation are key differentiators. An increasing number of trades are handled by algorithmic trading applications placed as close as possible to the trade execution venue. A challenge with these "black-box" trading engines is that they compound the volume increase by issuing orders only to cancel them and re-submit them. The cause of this behavior is lack of visibility into which venue offers best execution. The human trader is now a "financial engineer," a "quant" (quantitative analyst) with programming skills, who can adjust trading models on the fly. Firms develop new financial instruments like weather derivatives or cross-asset class trades and they need to deploy the new applications quickly and in a scalable fashion.
In the long term, competitive differentiation should come from analysis, not just knowledge. The star traders of tomorrow assume risk, achieve true client insight, and consistently beat the market (source IBM: www-935.ibm/services/us/imc/pdf/ge510-6270-trader. pdf).
Business resilience has been one main concern of trading firms since September 11, 2001. Solutions in this area range from redundant data centers situated in different geographies and connected to multiple trading venues to virtual trader solutions offering power traders most of the functionality of a trading floor in a remote location.
The financial services industry is one of the most demanding in terms of IT requirements. The industry is experiencing an architectural shift towards Services-Oriented Architecture (SOA), Web services, and virtualization of IT resources. SOA takes advantage of the increase in network speed to enable dynamic binding and virtualization of software components. This allows the creation of new applications without losing the investment in existing systems and infrastructure. The concept has the potential to revolutionize the way integration is done, enabling significant reductions in the complexity and cost of such integration (gigaspaces/download/MerrilLynchGigaSpacesWP. pdf).
Another trend is the consolidation of servers into data center server farms, while trader desks have only KVM extensions and ultra-thin clients (e. g., SunRay and HP blade solutions). High-speed Metro Area Networks enable market data to be multicast between different locations, enabling the virtualization of the trading floor.
High-Level Architecture.
Figure 1 depicts the high-level architecture of a trading environment. The ticker plant and the algorithmic trading engines are located in the high performance trading cluster in the firm's data center or at the exchange. The human traders are located in the end-user applications area.
Functionally there are two application components in the enterprise trading environment, publishers and subscribers. The messaging bus provides the communication path between publishers and subscribers.
There are two types of traffic specific to a trading environment:
• Market Data—Carries pricing information for financial instruments, news, and other value-added information such as analytics. It is unidirectional and very latency sensitive, typically delivered over UDP multicast. It is measured in updates/sec. and in Mbps. Market data flows from one or multiple external feeds, coming from market data providers like stock exchanges, data aggregators, and ECNs. Each provider has their own market data format. The data is received by feed handlers, specialized applications which normalize and clean the data and then send it to data consumers, such as pricing engines, algorithmic trading applications, or human traders. Sell-side firms also send the market data to their clients, buy-side firms such as mutual funds, hedge funds, and other asset managers. Some buy-side firms may opt to receive direct feeds from exchanges, reducing latency.
Figure 1 Trading Architecture for a Buy Side/Sell Side Firm.
There is no industry standard for market data formats. Each exchange has their proprietary format. Financial content providers such as Reuters and Bloomberg aggregate different sources of market data, normalize it, and add news or analytics. Examples of consolidated feeds are RDF (Reuters Data Feed), RWF (Reuters Wire Format), and Bloomberg Professional Services Data.
To deliver lower latency market data, both vendors have released real-time market data feeds which are less processed and have less analytics:
– Bloomberg B-Pipe—With B-Pipe, Bloomberg de-couples their market data feed from their distribution platform because a Bloomberg terminal is not required for get B-Pipe. Wombat and Reuters Feed Handlers have announced support for B-Pipe.
A firm may decide to receive feeds directly from an exchange to reduce latency. The gains in transmission speed can be between 150 milliseconds to 500 milliseconds. These feeds are more complex and more expensive and the firm has to build and maintain their own ticker plant (financetech/featured/showArticle. jhtml? articleID=60404306).
• Trading Orders—This type of traffic carries the actual trades. It is bi-directional and very latency sensitive. It is measured in messages/sec. and Mbps. The orders originate from a buy side or sell side firm and are sent to trading venues like an Exchange or ECN for execution. The most common format for order transport is FIX (Financial Information eXchange—fixprotocol/). The applications which handle FIX messages are called FIX engines and they interface with order management systems (OMS).
An optimization to FIX is called FAST (Fix Adapted for Streaming), which uses a compression schema to reduce message length and, in effect, reduce latency. FAST is targeted more to the delivery of market data and has the potential to become a standard. FAST can also be used as a compression schema for proprietary market data formats.
To reduce latency, firms may opt to establish Direct Market Access (DMA).
DMA is the automated process of routing a securities order directly to an execution venue, therefore avoiding the intervention by a third-party (towergroup/research/content/glossary. jsp? page=1&glossaryId=383). DMA requires a direct connection to the execution venue.
The messaging bus is middleware software from vendors such as Tibco, 29West, Reuters RMDS, or an open source platform such as AMQP. The messaging bus uses a reliable mechanism to deliver messages. The transport can be done over TCP/IP (TibcoEMS, 29West, RMDS, and AMQP) or UDP/multicast (TibcoRV, 29West, and RMDS). One important concept in message distribution is the "topic stream," which is a subset of market data defined by criteria such as ticker symbol, industry, or a certain basket of financial instruments. Subscribers join topic groups mapped to one or multiple sub-topics in order to receive only the relevant information. In the past, all traders received all market data. At the current volumes of traffic, this would be sub-optimal.
The network plays a critical role in the trading environment. Market data is carried to the trading floor where the human traders are located via a Campus or Metro Area high-speed network. High availability and low latency, as well as high throughput, are the most important metrics.
The high performance trading environment has most of its components in the Data Center server farm. To minimize latency, the algorithmic trading engines need to be located in the proximity of the feed handlers, FIX engines, and order management systems. An alternate deployment model has the algorithmic trading systems located at an exchange or a service provider with fast connectivity to multiple exchanges.
Deployment Models.
There are two deployment models for a high performance trading platform. Firms may chose to have a mix of the two:
• Data Center of the trading firm (Figure 2)—This is the traditional model, where a full-fledged trading platform is developed and maintained by the firm with communication links to all the trading venues. Latency varies with the speed of the links and the number of hops between the firm and the venues.
Figure 2 Traditional Deployment Model.
• Co-location at the trading venue (exchanges, financial service providers (FSP)) (Figure 3)
The trading firm deploys its automated trading platform as close as possible to the execution venues to minimize latency.
Figure 3 Hosted Deployment Model.
Services-Oriented Trading Architecture.
We are proposing a services-oriented framework for building the next-generation trading architecture. This approach provides a conceptual framework and an implementation path based on modularization and minimization of inter-dependencies.
This framework provides firms with a methodology to:
• Evaluate their current state in terms of services.
• Prioritize services based on their value to the business.
• Evolve the trading platform to the desired state using a modular approach.
The high performance trading architecture relies on the following services, as defined by the services architecture framework represented in Figure 4.
Figure 4 Service Architecture Framework for High Performance Trading.
Table 1 Service Descriptions and Technologies.
Ultra-low latency messaging.
Instrumentation—appliances, software agents, and router modules.
OS and I/O virtualization, Remote Direct Memory Access (RDMA), TCP Offload Engines (TOE)
Middleware which parallelizes application processing.
Middleware which speeds-up data access for applications, e. g., in-memory caching.
Hardware-assisted multicast replication through-out the network; multicast Layer 2 and Layer 3 optimizations.
Virtualization of storage hardware (VSANs), data replication, remote backup, and file virtualization.
Trading resilience and mobility.
Local and site load balancing and high availability campus networks.
Wide Area application services.
Acceleration of applications over a WAN connection for traders residing off-campus.
Thin client service.
De-coupling of the computing resources from the end-user facing terminals.
Ultra-Low Latency Messaging Service.
This service is provided by the messaging bus, which is a software system that solves the problem of connecting many-to-many applications. The system consists of:
• A set of pre-defined message schemas.
• A set of common command messages.
• A shared application infrastructure for sending the messages to recipients. The shared infrastructure can be based on a message broker or on a publish/subscribe model.
The key requirements for the next-generation messaging bus are (source 29West):
• Lowest possible latency (e. g., less than 100 microseconds)
• Stability under heavy load (e. g., more than 1.4 million msg/sec.)
• Control and flexibility (rate control and configurable transports)
There are efforts in the industry to standardize the messaging bus. Advanced Message Queueing Protocol (AMQP) is an example of an open standard championed by J. P. Morgan Chase and supported by a group of vendors such as Cisco, Envoy Technologies, Red Hat, TWIST Process Innovations, Iona, 29West, and iMatix. Two of the main goals are to provide a more simple path to inter-operability for applications written on different platforms and modularity so that the middleware can be easily evolved.
In very general terms, an AMQP server is analogous to an E-mail server with each exchange acting as a message transfer agent and each message queue as a mailbox. The bindings define the routing tables in each transfer agent. Publishers send messages to individual transfer agents, which then route the messages into mailboxes. Consumers take messages from mailboxes, which creates a powerful and flexible model that is simple (source: amqp/tikiwiki/tiki-index. php? page=OpenApproach#Why_AMQP_).
Latency Monitoring Service.
The main requirements for this service are:
• Sub-millisecond granularity of measurements.
• Near-real time visibility without adding latency to the trading traffic.
• Ability to differentiate application processing latency from network transit latency.
• Ability to handle high message rates.
• Provide a programmatic interface for trading applications to receive latency data, thus enabling algorithmic trading engines to adapt to changing conditions.
• Correlate network events with application events for troubleshooting purposes.
Latency can be defined as the time interval between when a trade order is sent and when the same order is acknowledged and acted upon by the receiving party.
Addressing the latency issue is a complex problem, requiring a holistic approach that identifies all sources of latency and applies different technologies at different layers of the system.
Figure 5 depicts the variety of components that can introduce latency at each layer of the OSI stack. It also maps each source of latency with a possible solution and a monitoring solution. This layered approach can give firms a more structured way of attacking the latency issue, whereby each component can be thought of as a service and treated consistently across the firm.
Maintaining an accurate measure of the dynamic state of this time interval across alternative routes and destinations can be of great assistance in tactical trading decisions. The ability to identify the exact location of delays, whether in the customer's edge network, the central processing hub, or the transaction application level, significantly determines the ability of service providers to meet their trading service-level agreements (SLAs). For buy-side and sell-side forms, as well as for market-data syndicators, the quick identification and removal of bottlenecks translates directly into enhanced trade opportunities and revenue.
Figure 5 Latency Management Architecture.
Cisco Low-Latency Monitoring Tools.
Traditional network monitoring tools operate with minutes or seconds granularity. Next-generation trading platforms, especially those supporting algorithmic trading, require latencies less than 5 ms and extremely low levels of packet loss. On a Gigabit LAN, a 100 ms microburst can cause 10,000 transactions to be lost or excessively delayed.
Cisco offers its customers a choice of tools to measure latency in a trading environment:
• Bandwidth Quality Manager (BQM) (OEM from Corvil)
• Cisco AON-based Financial Services Latency Monitoring Solution (FSMS)
Bandwidth Quality Manager.
Bandwidth Quality Manager (BQM) 4.0 is a next-generation network application performance management product that enables customers to monitor and provision their network for controlled levels of latency and loss performance. While BQM is not exclusively targeted at trading networks, its microsecond visibility combined with intelligent bandwidth provisioning features make it ideal for these demanding environments.
Cisco BQM 4.0 implements a broad set of patented and patent-pending traffic measurement and network analysis technologies that give the user unprecedented visibility and understanding of how to optimize the network for maximum application performance.
Cisco BQM is now supported on the product family of Cisco Application Deployment Engine (ADE). The Cisco ADE product family is the platform of choice for Cisco network management applications.
BQM Benefits.
Cisco BQM micro-visibility is the ability to detect, measure, and analyze latency, jitter, and loss inducing traffic events down to microsecond levels of granularity with per packet resolution. This enables Cisco BQM to detect and determine the impact of traffic events on network latency, jitter, and loss. Critical for trading environments is that BQM can support latency, loss, and jitter measurements one-way for both TCP and UDP (multicast) traffic. This means it reports seamlessly for both trading traffic and market data feeds.
BQM allows the user to specify a comprehensive set of thresholds (against microburst activity, latency, loss, jitter, utilization, etc.) on all interfaces. BQM then operates a background rolling packet capture. Whenever a threshold violation or other potential performance degradation event occurs, it triggers Cisco BQM to store the packet capture to disk for later analysis. This allows the user to examine in full detail both the application traffic that was affected by performance degradation ("the victims") and the traffic that caused the performance degradation ("the culprits"). This can significantly reduce the time spent diagnosing and resolving network performance issues.
BQM is also able to provide detailed bandwidth and quality of service (QoS) policy provisioning recommendations, which the user can directly apply to achieve desired network performance.
BQM Measurements Illustrated.
To understand the difference between some of the more conventional measurement techniques and the visibility provided by BQM, we can look at some comparison graphs. In the first set of graphs (Figure 6 and Figure 7), we see the difference between the latency measured by BQM's Passive Network Quality Monitor (PNQM) and the latency measured by injecting ping packets every 1 second into the traffic stream.
In Figure 6, we see the latency reported by 1-second ICMP ping packets for real network traffic (it is divided by 2 to give an estimate for the one-way delay). It shows the delay comfortably below about 5ms for almost all of the time.
Figure 6 Latency Reported by 1-Second ICMP Ping Packets for Real Network Traffic.
In Figure 7, we see the latency reported by PNQM for the same traffic at the same time. Here we see that by measuring the one-way latency of the actual application packets, we get a radically different picture. Here the latency is seen to be hovering around 20 ms, with occasional bursts far higher. The explanation is that because ping is sending packets only every second, it is completely missing most of the application traffic latency. In fact, ping results typically only indicate round trip propagation delay rather than realistic application latency across the network.
Figure 7 Latency Reported by PNQM for Real Network Traffic.
In the second example (Figure 8), we see the difference in reported link load or saturation levels between a 5-minute average view and a 5 ms microburst view (BQM can report on microbursts down to about 10-100 nanosecond accuracy). The green line shows the average utilization at 5-minute averages to be low, maybe up to 5 Mbits/s. The dark blue plot shows the 5ms microburst activity reaching between 75 Mbits/s and 100 Mbits/s, the LAN speed effectively. BQM shows this level of granularity for all applications and it also gives clear provisioning rules to enable the user to control or neutralize these microbursts.
Figure 8 Difference in Reported Link Load Between a 5-Minute Average View and a 5 ms Microburst View.
BQM Deployment in the Trading Network.
Figure 9 shows a typical BQM deployment in a trading network.
Figure 9 Typical BQM Deployment in a Trading Network.
BQM can then be used to answer these types of questions:
• Are any of my Gigabit LAN core links saturated for more than X milliseconds? Is this causing loss? Which links would most benefit from an upgrade to Etherchannel or 10 Gigabit speeds?
• What application traffic is causing the saturation of my 1 Gigabit links?
• Is any of the market data experiencing end-to-end loss?
• How much additional latency does the failover data center experience? Is this link sized correctly to deal with microbursts?
• Are my traders getting low latency updates from the market data distribution layer? Are they seeing any delays greater than X milliseconds?
Being able to answer these questions simply and effectively saves time and money in running the trading network.
BQM is an essential tool for gaining visibility in market data and trading environments. It provides granular end-to-end latency measurements in complex infrastructures that experience high-volume data movement. Effectively detecting microbursts in sub-millisecond levels and receiving expert analysis on a particular event is invaluable to trading floor architects. Smart bandwidth provisioning recommendations, such as sizing and what-if analysis, provide greater agility to respond to volatile market conditions. As the explosion of algorithmic trading and increasing message rates continues, BQM, combined with its QoS tool, provides the capability of implementing QoS policies that can protect critical trading applications.
Cisco Financial Services Latency Monitoring Solution.
Cisco and Trading Metrics have collaborated on latency monitoring solutions for FIX order flow and market data monitoring. Cisco AON technology is the foundation for a new class of network-embedded products and solutions that help merge intelligent networks with application infrastructure, based on either service-oriented or traditional architectures. Trading Metrics is a leading provider of analytics software for network infrastructure and application latency monitoring purposes (tradingmetrics/).
The Cisco AON Financial Services Latency Monitoring Solution (FSMS) correlated two kinds of events at the point of observation:
• Network events correlated directly with coincident application message handling.
• Trade order flow and matching market update events.
Using time stamps asserted at the point of capture in the network, real-time analysis of these correlated data streams permits precise identification of bottlenecks across the infrastructure while a trade is being executed or market data is being distributed. By monitoring and measuring latency early in the cycle, financial companies can make better decisions about which network service—and which intermediary, market, or counterparty—to select for routing trade orders. Likewise, this knowledge allows more streamlined access to updated market data (stock quotes, economic news, etc.), which is an important basis for initiating, withdrawing from, or pursuing market opportunities.
The components of the solution are:
• AON hardware in three form factors:
– AON Network Module for Cisco 2600/2800/3700/3800 routers.
– AON Blade for the Cisco Catalyst 6500 series.
– AON 8340 Appliance.
• Trading Metrics M&A 2.0 software, which provides the monitoring and alerting application, displays latency graphs on a dashboard, and issues alerts when slowdowns occur (tradingmetrics/TM_brochure. pdf).
Figure 10 AON-Based FIX Latency Monitoring.
Cisco IP SLA.
Cisco IP SLA is an embedded network management tool in Cisco IOS which allows routers and switches to generate synthetic traffic streams which can be measured for latency, jitter, packet loss, and other criteria (cisco/go/ipsla).
Two key concepts are the source of the generated traffic and the target. Both of these run an IP SLA "responder," which has the responsibility to timestamp the control traffic before it is sourced and returned by the target (for a round trip measurement). Various traffic types can be sourced within IP SLA and they are aimed at different metrics and target different services and applications. The UDP jitter operation is used to measure one-way and round-trip delay and report variations. As the traffic is time stamped on both sending and target devices using the responder capability, the round trip delay is characterized as the delta between the two timestamps.
A new feature was introduced in IOS 12.3(14)T, IP SLA Sub Millisecond Reporting, which allows for timestamps to be displayed with a resolution in microseconds, thus providing a level of granularity not previously available. This new feature has now made IP SLA relevant to campus networks where network latency is typically in the range of 300-800 microseconds and the ability to detect trends and spikes (brief trends) based on microsecond granularity counters is a requirement for customers engaged in time-sensitive electronic trading environments.
As a result, IP SLA is now being considered by significant numbers of financial organizations as they are all faced with requirements to:
• Report baseline latency to their users.
• Trend baseline latency over time.
• Respond quickly to traffic bursts that cause changes in the reported latency.
Sub-millisecond reporting is necessary for these customers, since many campus and backbones are currently delivering under a second of latency across several switch hops. Electronic trading environments have generally worked to eliminate or minimize all areas of device and network latency to deliver rapid order fulfillment to the business. Reporting that network response times are "just under one millisecond" is no longer sufficient; the granularity of latency measurements reported across a network segment or backbone need to be closer to 300-800 micro-seconds with a degree of resolution of 100 ì segundos.
IP SLA recently added support for IP multicast test streams, which can measure market data latency.
A typical network topology is shown in Figure 11 with the IP SLA shadow routers, sources, and responders.
Figure 11 IP SLA Deployment.
Computing Services.
Computing services cover a wide range of technologies with the goal of eliminating memory and CPU bottlenecks created by the processing of network packets. Trading applications consume high volumes of market data and the servers have to dedicate resources to processing network traffic instead of application processing.
• Transport processing—At high speeds, network packet processing can consume a significant amount of server CPU cycles and memory. An established rule of thumb states that 1Gbps of network bandwidth requires 1 GHz of processor capacity (source Intel white paper on I/O acceleration intel/technology/ioacceleration/306517.pdf).
• Intermediate buffer copying—In a conventional network stack implementation, data needs to be copied by the CPU between network buffers and application buffers. This overhead is worsened by the fact that memory speeds have not kept up with increases in CPU speeds. For example, processors like the Intel Xeon are approaching 4 GHz, while RAM chips hover around 400MHz (for DDR 3200 memory) (source Intel intel/technology/ioacceleration/306517.pdf).
• Context switching—Every time an individual packet needs to be processed, the CPU performs a context switch from application context to network traffic context. This overhead could be reduced if the switch would occur only when the whole application buffer is complete.
Figure 12 Sources of Overhead in Data Center Servers.
• TCP Offload Engine (TOE)—Offloads transport processor cycles to the NIC. Moves TCP/IP protocol stack buffer copies from system memory to NIC memory.
• Remote Direct Memory Access (RDMA)—Enables a network adapter to transfer data directly from application to application without involving the operating system. Eliminates intermediate and application buffer copies (memory bandwidth consumption).
• Kernel bypass — Direct user-level access to hardware. Dramatically reduces application context switches.
Figure 13 RDMA and Kernel Bypass.
InfiniBand is a point-to-point (switched fabric) bidirectional serial communication link which implements RDMA, among other features. Cisco offers an InfiniBand switch, the Server Fabric Switch (SFS): cisco/application/pdf/en/us/guest/netsol/ns500/c643/cdccont_0900aecd804c35cb. pdf.
Figure 14 Typical SFS Deployment.
Trading applications benefit from the reduction in latency and latency variability, as proved by a test performed with the Cisco SFS and Wombat Feed Handlers by Stac Research:
Application Virtualization Service.
De-coupling the application from the underlying OS and server hardware enables them to run as network services. One application can be run in parallel on multiple servers, or multiple applications can be run on the same server, as the best resource allocation dictates. This decoupling enables better load balancing and disaster recovery for business continuance strategies. The process of re-allocating computing resources to an application is dynamic. Using an application virtualization system like Data Synapse's GridServer, applications can migrate, using pre-configured policies, to under-utilized servers in a supply-matches-demand process (networkworld/supp/2005/ndc1/022105virtual. html? page=2).
There are many business advantages for financial firms who adopt application virtualization:
• Faster time to market for new products and services.
• Faster integration of firms following merger and acquisition activity.
• Increased application availability.
• Better workload distribution, which creates more "head room" for processing spikes in trading volume.
• Operational efficiency and control.
• Reduction in IT complexity.
Currently, application virtualization is not used in the trading front-office. One use-case is risk modeling, like Monte Carlo simulations. As the technology evolves, it is conceivable that some the trading platforms will adopt it.
Data Virtualization Service.
To effectively share resources across distributed enterprise applications, firms must be able to leverage data across multiple sources in real-time while ensuring data integrity. With solutions from data virtualization software vendors such as Gemstone or Tangosol (now Oracle), financial firms can access heterogeneous sources of data as a single system image that enables connectivity between business processes and unrestrained application access to distributed caching. The net result is that all users have instant access to these data resources across a distributed network (gridtoday/03/0210/101061.html).
This is called a data grid and is the first step in the process of creating what Gartner calls Extreme Transaction Processing (XTP) (gartner/DisplayDocument? ref=g_search&id=500947). Technologies such as data and applications virtualization enable financial firms to perform real-time complex analytics, event-driven applications, and dynamic resource allocation.
One example of data virtualization in action is a global order book application. An order book is the repository of active orders that is published by the exchange or other market makers. A global order book aggregates orders from around the world from markets that operate independently. The biggest challenge for the application is scalability over WAN connectivity because it has to maintain state. Today's data grids are localized in data centers connected by Metro Area Networks (MAN). This is mainly because the applications themselves have limits—they have been developed without the WAN in mind.
Figure 15 GemStone GemFire Distributed Caching.
Before data virtualization, applications used database clustering for failover and scalability. This solution is limited by the performance of the underlying database. Failover is slower because the data is committed to disc. With data grids, the data which is part of the active state is cached in memory, which reduces drastically the failover time. Scaling the data grid means just adding more distributed resources, providing a more deterministic performance compared to a database cluster.
Multicast Service.
Market data delivery is a perfect example of an application that needs to deliver the same data stream to hundreds and potentially thousands of end users. Market data services have been implemented with TCP or UDP broadcast as the network layer, but those implementations have limited scalability. Using TCP requires a separate socket and sliding window on the server for each recipient. UDP broadcast requires a separate copy of the stream for each destination subnet. Both of these methods exhaust the resources of the servers and the network. The server side must transmit and service each of the streams individually, which requires larger and larger server farms. On the network side, the required bandwidth for the application increases in a linear fashion. For example, to send a 1 Mbps stream to 1000recipients using TCP requires 1 Gbps of bandwidth.
IP multicast is the only way to scale market data delivery. To deliver a 1 Mbps stream to 1000 recipients, IP multicast would require 1 Mbps. The stream can be delivered by as few as two servers—one primary and one backup for redundancy.
There are two main phases of market data delivery to the end user. In the first phase, the data stream must be brought from the exchange into the brokerage's network. Typically the feeds are terminated in a data center on the customer premise. The feeds are then processed by a feed handler, which may normalize the data stream into a common format and then republish into the application messaging servers in the data center.
The second phase involves injecting the data stream into the application messaging bus which feeds the core infrastructure of the trading applications. The large brokerage houses have thousands of applications that use the market data streams for various purposes, such as live trades, long term trending, arbitrage, etc. Many of these applications listen to the feeds and then republish their own analytical and derivative information. For example, a brokerage may compare the prices of CSCO to the option prices of CSCO on another exchange and then publish ratings which a different application may monitor to determine how much they are out of synchronization.
Figure 16 Market Data Distribution Players.
The delivery of these data streams is typically over a reliable multicast transport protocol, traditionally Tibco Rendezvous. Tibco RV operates in a publish and subscribe environment. Each financial instrument is given a subject name, such as CSCO. last. Each application server can request the individual instruments of interest by their subject name and receive just a that subset of the information. This is called subject-based forwarding or filtering. Subject-based filtering is patented by Tibco.
A distinction should be made between the first and second phases of market data delivery. The delivery of market data from the exchange to the brokerage is mostly a one-to-many application. The only exception to the unidirectional nature of market data may be retransmission requests, which are usually sent using unicast. The trading applications, however, are definitely many-to-many applications and may interact with the exchanges to place orders.
Figure 17 Market Data Architecture.
Design Issues.
Number of Groups/Channels to Use.
Many application developers consider using thousand of multicast groups to give them the ability to divide up products or instruments into small buckets. Normally these applications send many small messages as part of their information bus. Usually several messages are sent in each packet that are received by many users. Sending fewer messages in each packet increases the overhead necessary for each message.
In the extreme case, sending only one message in each packet quickly reaches the point of diminishing returns—there is more overhead sent than actual data. Application developers must find a reasonable compromise between the number of groups and breaking up their products into logical buckets.
Consider, for example, the Nasdaq Quotation Dissemination Service (NQDS). The instruments are broken up alphabetically:
Another example is the Nasdaq Totalview service, broken up this way:
This approach allows for straight forward network/application management, but does not necessarily allow for optimized bandwidth utilization for most users. A user of NQDS that is interested in technology stocks, and would like to subscribe to just CSCO and INTL, would have to pull down all the data for the first two groups of NQDS. Understanding the way users pull down the data and then organize it into appropriate logical groups optimizes the bandwidth for each user.
In many market data applications, optimizing the data organization would be of limited value. Typically customers bring in all data into a few machines and filter the instruments. Using more groups is just more overhead for the stack and does not help the customers conserve bandwidth. Another approach might be to keep the groups down to a minimum level and use UDP port numbers to further differentiate if necessary. The other extreme would be to use just one multicast group for the entire application and then have the end user filter the data. In some situations this may be sufficient.
Intermittent Sources.
A common issue with market data applications are servers that send data to a multicast group and then go silent for more than 3.5 minutes. These intermittent sources may cause trashing of state on the network and can introduce packet loss during the window of time when soft state and then hardware shorts are being created.
PIM-Bidir or PIM-SSM.
The first and best solution for intermittent sources is to use PIM-Bidir for many-to-many applications and PIM-SSM for one-to-many applications.
Both of these optimizations of the PIM protocol do not have any data-driven events in creating forwarding state. That means that as long as the receivers are subscribed to the streams, the network has the forwarding state created in the hardware switching path.
Intermittent sources are not an issue with PIM-Bidir and PIM-SSM.
Null Packets.
In PIM-SM environments a common method to make sure forwarding state is created is to send a burst of null packets to the multicast group before the actual data stream. The application must efficiently ignore these null data packets to ensure it does not affect performance. The sources must only send the burst of packets if they have been silent for more than 3 minutes. A good practice is to send the burst if the source is silent for more than a minute. Many financials send out an initial burst of traffic in the morning and then all well-behaved sources do not have problems.
Periodic Keepalives or Heartbeats.
An alternative approach for PIM-SM environments is for sources to send periodic heartbeat messages to the multicast groups. This is a similar approach to the null packets, but the packets can be sent on a regular timer so that the forwarding state never expires.
S, G Expiry Timer.
Finally, Cisco has made a modification to the operation of the S, G expiry timer in IOS. There is now a CLI knob to allow the state for a S, G to stay alive for hours without any traffic being sent. The (S, G) expiry timer is configurable. This approach should be considered a workaround until PIM-Bidir or PIM-SSM is deployed or the application is fixed.
RTCP Feedback.
A common issue with real time voice and video applications that use RTP is the use of RTCP feedback traffic. Unnecessary use of the feedback option can create excessive multicast state in the network. If the RTCP traffic is not required by the application it should be avoided.
Fast Producers and Slow Consumers.
Today many servers providing market data are attached at Gigabit speeds, while the receivers are attached at different speeds, usually 100Mbps. This creates the potential for receivers to drop packets and request re-transmissions, which creates more traffic that the slowest consumers cannot handle, continuing the vicious circle.
The solution needs to be some type of access control in the application that limits the amount of data that one host can request. QoS and other network functions can mitigate the problem, but ultimately the subscriptions need to be managed in the application.
Tibco Heartbeats.
TibcoRV has had the ability to use IP multicast for the heartbeat between the TICs for many years. However, there are some brokerage houses that are still using very old versions of TibcoRV that use UDP broadcast support for the resiliency. This limitation is often cited as a reason to maintain a Layer 2 infrastructure between TICs located in different data centers. These older versions of TibcoRV should be phased out in favor of the IP multicast supported versions.
Multicast Forwarding Options.
PIM Sparse Mode.
The standard IP multicast forwarding protocol used today for market data delivery is PIM Sparse Mode. It is supported on all Cisco routers and switches and is well understood. PIM-SM can be used in all the network components from the exchange, FSP, and brokerage.
There are, however, some long-standing issues and unnecessary complexity associated with a PIM-SM deployment that could be avoided by using PIM-Bidir and PIM-SSM. These are covered in the next sections.
The main components of the PIM-SM implementation are:
• PIM Sparse Mode v2.
• Shared Tree (spt-threshold infinity)
A design option in the brokerage or in the exchange.
Details of Anycast RP can be found in:
The classic high availability design for Tibco in the brokerage network is documented in:
Bidirectional PIM.
PIM-Bidir is an optimization of PIM Sparse Mode for many-to-many applications. It has several key advantages over a PIM-SM deployment:
• Better support for intermittent sources.
• No data-triggered events.
One of the weaknesses of PIM-SM is that the network continually needs to react to active data flows. This can cause non-deterministic behavior that may be hard to troubleshoot. PIM-Bidir has the following major protocol differences over PIM-SM:
– No source registration.
Source traffic is automatically sent to the RP and then down to the interested receivers. There is no unicast encapsulation, PIM joins from the RP to the first hop router and then registration stop messages.
All PIM-Bidir traffic is forwarded on a *,G forwarding entry. The router does not have to monitor the traffic flow on a *,G and then send joins when the traffic passes a threshold.
– No need for an actual RP.
The RP does not have an actual protocol function in PIM-Bidir. The RP acts as a routing vector in which all the traffic converges. The RP can be configured as an address that is not assigned to any particular device. This is called a Phantom RP.
– No need for MSDP.
MSDP provides source information between RPs in a PIM-SM network. PIM-Bidir does not use the active source information for any forwarding decisions and therefore MSDP is not required.
Bidirectional PIM is ideally suited for the brokerage network in the data center of the exchange. In this environment there are many sources sending to a relatively few set of groups in a many-to-many traffic pattern.
The key components of the PIM-Bidir implementation are:
Further details about Phantom RP and basic PIM-Bidir design are documented in:
Source Specific Multicast.
PIM-SSM is an optimization of PIM Sparse Mode for one-to-many applications. In certain environments it can offer several distinct advantages over PIM-SM. Like PIM-Bidir, PIM-SSM does not rely on any data-triggered events. Furthermore, PIM-SSM does not require an RP at all—there is no such concept in PIM-SSM. The forwarding information in the network is completely controlled by the interest of the receivers.
Source Specific Multicast is ideally suited for market data delivery in the financial service provider. The FSP can receive the feeds from the exchanges and then route them to the end of their network.
Many FSPs are also implementing MPLS and Multicast VPNs in their core. PIM-SSM is the preferred method for transporting traffic in VRFs.
When PIM-SSM is deployed all the way to the end user, the receiver indicates his interest in a particular S, G with IGMPv3. Even though IGMPv3 was defined by RFC 2236 back in October, 2002, it still has not been implemented by all edge devices. This creates a challenge for deploying an end-to-end PIM-SSM service. A transitional solution has been developed by Cisco to enable an edge device that supports IGMPv2 to participate in an PIM-SSM service. This feature is called SSM Mapping and is documented in:
Storage Services.
The service provides storage capabilities into the market data and trading environments. Trading applications access backend storage to connect to different databases and other repositories consisting of portfolios, trade settlements, compliance data, management applications, Enterprise Service Bus (ESB), and other critical applications where reliability and security is critical to the success of the business. The main requirements for the service are:
Storage virtualization is an enabling technology that simplifies management of complex infrastructures, enables non-disruptive operations, and facilitates critical elements of a proactive information lifecycle management (ILM) strategy. EMC Invista running on the Cisco MDS 9000 enables heterogeneous storage pooling and dynamic storage provisioning, allowing allocation of any storage to any application. High availability is increased with seamless data migration. Appropriate class of storage is allocated to point-in-time copies (clones). Storage virtualization is also leveraged through the use of Virtual Storage Area Networks (VSANs), which enable the consolidation of multiple isolated SANs onto a single physical SAN infrastructure, while still partitioning them as completely separate logical entities. VSANs provide all the security and fabric services of traditional SANs, yet give organizations the flexibility to easily move resources from one VSAN to another. This results in increased disk and network utilization while driving down the cost of management. Integrated Inter VSAN Routing (IVR) enables sharing of common resources across VSANs.
Figure 18 High Performance Computing Storage.
Replication of data to a secondary and tertiary data center is crucial for business continuance. Replication offsite over Fiber Channel over IP (FCIP) coupled with write acceleration and tape acceleration provides improved performance over long distance. Continuous Data Replication (CDP) is another mechanism which is gaining popularity in the industry. It refers to backup of computer data by automatically saving a copy of every change made to that data, essentially capturing every version of the data that the user saves. It allows the user or administrator to restore data to any point in time. Solutions from EMC and Incipient utilize the SANTap protocol on the Storage Services Module (SSM) in the MDS platform to provide CDP functionality. The SSM uses the SANTap service to intercept and redirect a copy of a write between a given initiator and target. The appliance does not reside in the data path—it is completely passive. The CDP solutions typically leverage a history journal that tracks all changes and bookmarks that identify application-specific events. This ensures that data at any point in time is fully self-consistent and is recoverable instantly in the event of a site failure.
Backup procedure reliability and performance are extremely important when storing critical financial data to a SAN. The use of expensive media servers to move data from disk to tape devices can be cumbersome. Network-accelerated serverless backup (NASB) helps you back up increased amounts of data in shorter backup time frames by shifting the data movement from multiple backup servers to Cisco MDS 9000 Series multilayer switches. This technology decreases impact on application servers because the MDS offloads the application and backup servers. It also reduces the number of backup and media servers required, thus reducing CAPEX and OPEX. The flexibility of the backup environment increases because storage and tape drives can reside anywhere on the SAN.
Trading Resilience and Mobility.
The main requirements for this service are to provide the virtual trader:
• Fully scalable and redundant campus trading environment.
• Resilient server load balancing and high availability in analytic server farms.
• Global site load balancing that provide the capability to continue participating in the market venues of closest proximity.
A highly-available campus environment is capable of sustaining multiple failures (i. e., links, switches, modules, etc.), which provides non-disruptive access to trading systems for traders and market data feeds. Fine-tuned routing protocol timers, in conjunction with mechanisms such as NSF/SSO, provide subsecond recovery from any failure.
The high-speed interconnect between data centers can be DWDM/dark fiber, which provides business continuance in case of a site failure. Each site is 100km-200km apart, allowing synchronous data replication. Usually the distance for synchronous data replication is 100km, but with Read/Write Acceleration it can stretch to 200km. A tertiary data center can be greater than 200km away, which would replicate data in an asynchronous fashion.
Figure 19 Trading Resilience.
A robust server load balancing solution is required for order routing, algorithmic trading, risk analysis, and other services to offer continuous access to clients regardless of a server failure. Multiple servers encompass a "farm" and these hosts can added/removed without disruption since they reside behind a virtual IP (VIP) address which is announced in the network.
A global site load balancing solution provides remote traders the resiliency to access trading environments which are closer to their location. This minimizes latency for execution times since requests are always routed to the nearest venue.
Figure 20 Virtualization of Trading Environment.
A trading environment can be virtualized to provide segmentation and resiliency in complex architectures. Figure 20 illustrates a high-level topology depicting multiple market data feeds entering the environment, whereby each vendor is assigned its own Virtual Routing and Forwarding (VRF) instance. The market data is transferred to a high-speed InfiniBand low-latency compute fabric where feed handlers, order routing systems, and algorithmic trading systems reside. All storage is accessed via a SAN and is also virtualized with VSANs, allowing further security and segmentation. The normalized data from the compute fabric is transferred to the campus trading environment where the trading desks reside.
Wide Area Application Services.
This service provides application acceleration and optimization capabilities for traders who are located outside of the core trading floor facility/data center and working from a remote office. To consolidate servers and increase security in remote offices, file servers, NAS filers, storage arrays, and tape drives are moved to a corporate data center to increase security and regulatory compliance and facilitate centralized storage and archival management. As the traditional trading floor is becoming more virtual, wide area application services technology is being utilized to provide a "LAN-like" experience to remote traders when they access resources at the corporate site. Traders often utilize Microsoft Office applications, especially Excel in addition to Sharepoint and Exchange. Excel is used heavily for modeling and permutations where sometime only small portions of the file are changed. CIFS protocol is notoriously known to be "chatty," where several message normally traverse the WAN for a simple file operation and it is addressed by Wide Area Application Service (WAAS) technology. Bloomberg and Reuters applications are also very popular financial tools which access a centralized SAN or NAS filer to retrieve critical data which is fused together before represented to a trader's screen.
Figure 21 Wide Area Optimization.
A pair of Wide Area Application Engines (WAEs) that reside in the remote office and the data center provide local object caching to increase application performance. The remote office WAEs can be a module in the ISR router or a stand-alone appliance. The data center WAE devices are load balanced behind an Application Control Engine module installed in a pair of Catalyst 6500 series switches at the aggregation layer. The WAE appliance farm is represented by a virtual IP address. The local router in each site utilizes Web Cache Communication Protocol version 2 (WCCP v2) to redirect traffic to the WAE that intercepts the traffic and determines if there is a cache hit or miss. The content is served locally from the engine if it resides in cache; otherwise the request is sent across the WAN the initial time to retrieve the object. This methodology optimizes the trader experience by removing application latency and shielding the individual from any congestion in the WAN.
WAAS uses the following technologies to provide application acceleration:
• Data Redundancy Elimination (DRE) is an advanced form of network compression which allows the WAE to maintain a history of previously-seen TCP message traffic for the purposes of reducing redundancy found in network traffic. This combined with the Lempel-Ziv (LZ) compression algorithm reduces the number of redundant packets that traverse the WAN, which improves application transaction performance and conserves bandwidth.
• Transport Flow Optimization (TFO) employs a robust TCP proxy to safely optimize TCP at the WAE device by applying TCP-compliant optimizations to shield the clients and servers from poor TCP behavior because of WAN conditions. By running a TCP proxy between the devices and leveraging an optimized TCP stack between the devices, many of the problems that occur in the WAN are completely blocked from propagating back to trader desktops. The traders experience LAN-like TCP response times and behavior because the WAE is terminating TCP locally. TFO improves reliability and throughput through increases in TCP window scaling and sizing enhancements in addition to superior congestion management.
Thin Client Service.
This service provides a "thin" advanced trading desktop which delivers significant advantages to demanding trading floor environments requiring continuous growth in compute power. As financial institutions race to provide the best trade executions for their clients, traders are utilizing several simultaneous critical applications that facilitate complex transactions. It is not uncommon to find three or more workstations and monitors at a trader's desk which provide visibility into market liquidity, trading venues, news, analysis of complex portfolio simulations, and other financial tools. In addition, market dynamics continue to evolve with Direct Market Access (DMA), ECNs, alternative trading volumes, and upcoming regulation changes with Regulation National Market System (RegNMS) in the US and Markets in Financial Instruments Directive (MiFID) in Europe. At the same time, business seeks greater control, improved ROI, and additional flexibility, which creates greater demands on trading floor infrastructures.
Traders no longer require multiple workstations at their desk. Thin clients consist of keyboard, mouse, and multi-displays which provide a total trader desktop solution without compromising security. Hewlett Packard, Citrix, Desktone, Wyse, and other vendors provide thin client solutions to capitalize on the virtual desktop paradigm. Thin clients de-couple the user-facing hardware from the processing hardware, thus enabling IT to grow the processing power without changing anything on the end user side. The workstation computing power is stored in the data center on blade workstations, which provide greater scalability, increased data security, improved business continuance across multiple sites, and reduction in OPEX by removing the need to manage individual workstations on the trading floor. One blade workstation can be dedicated to a trader or shared among multiple traders depending on the requirements for computer power.
The "thin client" solution is optimized to work in a campus LAN environment, but can also extend the benefits to traders in remote locations. Latency is always a concern when there is a WAN interconnecting the blade workstation and thin client devices. The network connection needs to be sized accordingly so traffic is not dropped if saturation points exist in the WAN topology. WAN Quality of Service (QoS) should prioritize sensitive traffic. There are some guidelines which should be followed to allow for an optimized user experience. A typical highly-interactive desktop experience requires a client-to-blade round trip latency of <20ms for a 2Kb packet size. There may be a slight lag in display if network latency is between 20ms to 40ms. A typical trader desk with a four multi-display terminal requires 2-3Mbps bandwidth consumption with seamless communication with blade workstation(s) in the data center. Streaming video (800x600 at 24fps/full color) requires 9 Mbps bandwidth usage.
Figure 22 Thin Client Architecture.
Management of a large thin client environment is simplified since a centralized IT staff manages all of the blade workstations dispersed across multiple data centers. A trader is redirected to the most available environment in the enterprise in the event of a particular site failure. High availability is a key concern in critical financial environments and the Blade Workstation design provides rapid provisioning of another blade workstation in the data center. This resiliency provides greater uptime, increases in productivity, and OpEx reduction.
Advanced Encryption Standard.
Advanced Message Queueing Protocol.
Application Oriented Networking.
The Archipelago® Integrated Web book gives investors the unique opportunity to view the entire ArcaEx and ArcaEdge books in addition to books made available by other market participants.
ECN Order Book feed available via NASDAQ.
Chicago Board of Trade.
Class-Based Weighted Fair Queueing.
Continuous Data Replication.
Chicago Mercantile Exchange is engaged in trading of futures contracts and derivatives.
Central Processing Unit.
Distributed Defect Tracking System.
Acesso direto ao mercado.
Data Redundancy Elimination.
Dense Wavelength Division Multiplexing.
Electronic Communication Network.
Enterprise Service Bus.
Enterprise Solutions Engineering.
FIX Adapted for Streaming.
Fibre Channel over IP.
Financial Information Exchange.
Financial Services Latency Monitoring Solution.
Financial Service Provider.
Information Lifecycle Management.
Instinet Island Book.
Internetworking Operating System.
Keyboard Video Mouse.
Low Latency Queueing.
Metro Area Network.
Multilayer Director Switch.
Markets in Financial Instruments Directive.
Message Passing Interface is an industry standard specifying a library of functions to enable the passing of messages between nodes within a parallel computing environment.
Network Attached Storage.
Network Accelerated Serverless Backup.
Network Interface Card.
Nasdaq Quotation Dissemination Service.
Sistema de gerenciamento de pedidos.
Open Systems Interconnection.
Protocol Independent Multicast.
PIM-Source Specific Multicast.
Qualidade de serviço.
Random Access Memory.
Reuters Data Feed.
Reuters Data Feed Direct.
Remote Direct Memory Access.
Regulation National Market System.
Remote Graphics Software.
Reuters Market Data System.
RTP Control Protocol.
Real Time Protocol.
Reuters Wire Format.
Storage Area Network.
Small Computer System Interface.
Sockets Direct Protocol—Given that many modern applications are written using the sockets API, SDP can intercept the sockets at the kernel level and map these socket calls to an InfiniBand transport service that uses RDMA operations to offload data movement from the CPU to the HCA hardware.
Server Fabric Switch.
Secure Financial Transaction Infrastructure network developed to provide firms with excellent communication paths to NYSE Group, AMEX, Chicago Stock Exchange, NASDAQ, and other exchanges. It is often used for order routing.
When speed matters. leverage ACTIV.
To make fast trade decisions, the first step is fast market data. ACTIV provides industry leading solutions in direct feed management with FPGA acceleration and co-location sites. Leverage the ACTIV low latency suite today.
Direct Feeds.
Providing low latency direct feeds with powerful API's that are managed, cost efficient and continuously optimized.
Hardware Acceleration (FPGA)
Change the playing field for your business by moving to hardware acceleration for top performance.
Co-Location.
Reducing the distance that data travels is critical. Leverage ACTIV's managed co-location sites around the world.
In-Center Connectivity.
Optimize your market data connectivity with ACTIV's fast exchange links, switches, servers, and connections.
Activ Workstation.
Meet Our Partners.
“ACTIV’s world class global market data offering adds significant value to our financial ecosystem.”
John Knuff, GM of Global Financial Services at Equinix.
For the Enterprise.
Organizing the complex needs of global enterprises through an advanced suite of market data solutions built to service multiple applications.
For the Exchange.
Advanced distribution technologies to drive order flow and maximize value from proprietary content and co-location facilities.
Negociação automatizada.
When microseconds matter, ACTIV's direct feed solutions including our FPGA advantage provide the lowest latencies with global scale.
No comments:
Post a Comment