{"id":4560,"date":"2020-06-10T14:41:07","date_gmt":"2020-06-10T13:41:07","guid":{"rendered":"https:\/\/sandbox.weareadaptive.com\/?p=4560\/"},"modified":"2020-06-10T14:50:31","modified_gmt":"2020-06-10T13:50:31","slug":"accelerating-trading-system-development-aeron-hydra-platform-adaptive-part-iv","status":"publish","type":"post","link":"https:\/\/sandbox.weareadaptive.com\/fr\/2020\/06\/10\/accelerating-trading-system-development-aeron-hydra-platform-adaptive-part-iv\/","title":{"rendered":"Accelerating trading system development with Aeron, Hydra Platform and Adaptive (Part IV)"},"content":{"rendered":"<h1><b>Operating Aeron and Hydra Platform based solutions<\/b><\/h1>\n<p>This article is the fourth in a series of four blog posts on Aeron and Hydra Platform:<\/p>\n<ul>\n<li>Part I:\u00a0History of Aeron and Hydra\u00a0Platform. <a href=\"https:\/\/sandbox.weareadaptive.com\/2020\/05\/20\/aeronhydra\/\" target=\"_blank\" rel=\"noopener noreferrer\">Read here &gt;&gt;<\/a><\/li>\n<li>Part II:\u00a05 trading solutions we delivered on top of Aeron and Hydra\u00a0Platform.\u00a0<a href=\"https:\/\/sandbox.weareadaptive.com\/2020\/05\/27\/aeronhydra-part-ii\/\" target=\"_blank\" rel=\"noopener noreferrer\">Read here &gt;&gt;<\/a><\/li>\n<li>Part III:\u00a0Aeron and Hydra Platform in a trading platform.\u00a0<a href=\"https:\/\/sandbox.weareadaptive.com\/2020\/06\/04\/accelerating-trading-system-development-aeron-hydra-platform-adaptive-part-iii\/\" target=\"_blank\" rel=\"noopener noreferrer\">Read here &gt;&gt;<\/a><\/li>\n<li><strong><span style=\"color: #27578c;\">Part IV:\u00a0Operating Aeron and Hydra Platform based solutions.<\/span><\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">In the previous blog post I talked about the role Aeron and Hydra Platform play in trading platform architecture and we looked at some of the platform components we offer to accelerate and de-risk the development of trading systems for our clients.<\/p>\n<p style=\"text-align: justify;\">Today we\u2019ll look at the operational perspective and the tools we have on our belt to operate such a platform.<\/p>\n<p style=\"text-align: justify;\">The following diagram provides an overview of the modules deployed on one of the matching engine cluster nodes. In Hydra Platform, we package Aeron components (in green on the diagram) alongside Hydra Platform operational components (in dark blue) in a generic docker container. Application developers can then overlay a Docker layer to add the application business logic, in this case, containing the match engine. Docker offers a convenient and standardised way to package and configure components. In terms of performance overhead, we use kernel bypass, so the network I\/O stack of Docker does not have an impact on latency as we bypass it.<\/p>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4601 size-full\" src=\"https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/06\/HydraX-architecture-with-Hydra-2.png\" alt=\"\" width=\"960\" height=\"540\" srcset=\"https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/06\/HydraX-architecture-with-Hydra-2.png 960w, https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/06\/HydraX-architecture-with-Hydra-2-300x169.png 300w, https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/06\/HydraX-architecture-with-Hydra-2-768x432.png 768w, https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/06\/HydraX-architecture-with-Hydra-2-928x522.png 928w, https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/06\/HydraX-architecture-with-Hydra-2-667x375.png 667w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p style=\"text-align: justify;\">What follows is an overview of the components included in our standard Hydra Platform docker container:<\/p>\n<h5><span style=\"color: #27578c;\">Aeron<\/span><\/h5>\n<p style=\"text-align: justify;\">Pre-configured Aeron modules including the Aeron driver, Archiver and consensus module (cluster). This allows developers to get up and running quickly with a deployed version of a service based on Aeron. A standardised and battle tested deployment layout also reduces support effort as each of our deployment is consistent across projects and clients.<\/p>\n<h5><span style=\"color: #27578c;\">Performance and monitoring<\/span><\/h5>\n<ul>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #27578c;\">Hydra Platform thread affinity profiles:<\/span>\u00a0<\/strong>this module allows us to set a performance profile on the container so the same container can be used in \u201cdesktop\u201d mode for development or \u201cnitro\u201d mode for production where hot threads are pinned to cores for optimal performance.<\/li>\n<li><strong><span style=\"color: #27578c;\">Hydra Platform monitoring probe:<\/span><\/strong> Aeron provides a low level API (stats-monitor) to collect various Aeron related metrics. Hydra Platform uses the same mechanism to expose its metrics, and we provide a monitoring probe capable of collecting these stats efficiently, so they can be sent to an external monitoring system in a standard format. The probe also exposes the health status of the node. Bespoke business logic metrics can also be set, and Hydra Platform will expose them via this probe.<\/li>\n<li><span style=\"color: #27578c;\"><strong>Hydra Platform latency monitoring:\u00a0<\/strong><\/span>Hydra Platform collects component level latency metrics stored as histograms, and various latency statistics are exposed via the monitoring probe.<\/li>\n<\/ul>\n<h5><span style=\"color: #27578c;\">Security<\/span><\/h5>\n<ul>\n<li style=\"text-align: justify;\"><span style=\"color: #27578c;\"><strong>Hydra Platform cluster authentication:\u00a0<\/strong><\/span>Aeron Cluster provides hooks to implement an authentication protocol that Hydra Platform implements with an authentication module based on SCRAM (Salted Challenge Response Authentication Mechanism)<\/li>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #27578c;\">Hydra Platform encryption:<\/span><\/strong> this module provides encryption for data in transit and at rest. It leverages IPSEC for data in transit and file system encryption for data at rest.<\/li>\n<\/ul>\n<h5><span style=\"color: #27578c;\">Data management<\/span><\/h5>\n<ul>\n<li><span style=\"color: #27578c;\"><strong>Hydra Platform data maintenance:\u00a0<\/strong><\/span>Hydra Platform provides tools to automatically purge message logs to recover disk space on the system and enable the system to run for long periods of time without maintenance downtimes.<\/li>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #27578c;\">Hydra Platform backup\/restore:<\/span>\u00a0<\/strong>this Hydra Platform tooling allows operators to backup cluster recovery plans and restore them. This can be used to extract data from one environment and move it to another.<\/li>\n<li style=\"text-align: justify;\"><span style=\"color: #27578c;\"><strong>Hydra Platform Disaster Recovery (DR):\u00a0<\/strong><\/span>Hydra Platform provides a standalone component capable of connecting remotely to a cluster from a secondary data center. This component replicates a persistent stream asynchronously. In the event of a primary site failure, it is possible to seed a secondary cluster in the DR site using the replicated data. For Cloud-based deployment, this approach allows our clients to very significantly reduce hosting costs as the DR site can be provisioned on demand, instead of being active all the time. This alone can half the hosting cost compared to an on premise solution, where two sites are required all the time.<\/li>\n<\/ul>\n<h5><span style=\"color: #27578c;\">Troubleshooting<\/span><\/h5>\n<ul>\n<li style=\"text-align: justify;\"><span style=\"color: #27578c;\"><strong>Hydra Platform time travel:\u00a0<\/strong><\/span>One of the great aspects of this architecture is its deterministic nature. If a business logic exception occurs, it is possible for a developer or operator to \u201creplay\u201d the transactions with a debugger attached and get the exact same exception to occur deterministically. In most systems it generally takes more time to reproduce bugs than to actually fix them. With this design, reproducing a bug is generally a matter of replaying the log. We have built tooling in Hydra Platform to make this process straightforward so any developer can extract a recovery plan from the cluster and replay it at will in a development environment. I could not stress enough how powerful this is. This is a game changer compared to more traditional architectures where you rely on application logs to troubleshoot issues.<\/li>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #27578c;\">Hydra Platform stream introspection:<\/span><\/strong> This tool works hand in hand with Hydra Platform codecs and is able to decode message streams and turn them into human readable format. This allows developers and operators to get a better understanding of messages flowing into the system, for development or operational purpose.<\/li>\n<li style=\"text-align: justify;\"><span style=\"color: #27578c;\"><strong>Hydra Platform divergence detection:<\/strong><\/span> The business logic hosted in an Aeron cluster node must be deterministic. Subtle non-deterministic bugs can make their way into the business logic and stay undetected for a while. This module monitors Aeron Cluster output streams and can detect divergence at the transaction level. If a follower node diverges, the module prevents the node from becoming a leader and raises an alert.<\/li>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #27578c;\">Hydra Platform poison message:<\/span> <\/strong>Since business logic is deterministic, unhandled exceptions in the cluster will take down the whole cluster (i.e., each node will fail at the same transaction). When such incidents happen, operators can use Hydra Platform inspection tooling to investigate the issue and apply remediations. Such an issue can generally be fixed by rolling out a patch to the code. Alternatively, if a workaround is available, the tooling allows operators to remove the poison message from the log before restarting the system.<\/li>\n<li style=\"text-align: justify;\"><strong><span style=\"color: #27578c;\">Hydra Platform snapshot modification: <\/span><\/strong>Hydra Platform repositories generate binary snapshots. This tool allows operators to turn a binary snapshot into a SQL Database. The database can be used to inspect snapshot data. If required, the data can be modified in the database and the tooling can rebuild a binary snapshot from the modified database.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">As pointed out in this blog series Aeron and Aeron Cluster provide a significant advantage for the financial community. These components have been continuously refined and enhanced during the past 6 years of development and deployed by a wide range of firms. Hydra Platform further accelerates and de-risk the development of trading platforms, providing a mature set of libraries and tools for developers and operators. Our clients are using this tooling to rapidly deliver market-defining trading venues and infrastructure today. Get in touch to see how Hydra Platform can help accelerate your delivery.<\/p>\n<p style=\"text-align: justify;\">This concludes this blog series, hopefully, you enjoyed it. If you have any questions feel free to reach out to me on <a href=\"https:\/\/www.linkedin.com\/in\/odeheurles\/\" target=\"_blank\" rel=\"noopener noreferrer\">LinkedIn<\/a> or please get in touch with our <a href=\"mailto:sales@weareadaptive.com\">sales team<\/a>.<\/p>\n<blockquote>\n<p style=\"text-align: justify;\"><em>The series is also available for download as a white paper. In this paper, we provide an overview of Aeron &amp; Aeron Cluster, and look at some of the projects we have developed using Aeron during the past 3 years. We then provide an overview of Hydra Platform which contains some of the building blocks we produced to complement Aeron and further accelerate the development of systems we build. While we do not go into deep technical details, this document is particularly suited for developers, architects and CTOs.<\/em><\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p><a class=\"waves-effect waves-light btn-flat give2take\" download=\"\" data-href=\"https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/05\/Whitepaper_Aeron_Hydra_Platform_Adaptive_May2020.pdf\">Get the white paper<\/a><\/p>\n<p style=\"text-align: right;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-4061 alignright\" src=\"https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/04\/Olivier_round-150x150.png\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/04\/Olivier_round-150x150.png 150w, https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/04\/Olivier_round-120x120.png 120w, https:\/\/sandbox.weareadaptive.com\/wp-content\/uploads\/2020\/04\/Olivier_round.png 189w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/p>\n<h1 style=\"text-align: right;\">Olivier Deheurles<\/h1>\n<p style=\"text-align: right;\">Co-founder and Chief Technology Officer,<br \/>\nAdaptive Financial Consulting Ltd<\/p>\n<p style=\"text-align: right;\"><button class=\"waves-effect waves-light btn-flat alt cta-talk\">Let\u2019s talk<\/button><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Operating Aeron and Hydra Platform based solutions This article is the fourth in a series of four blog posts on &#8230;<\/p>\n","protected":false},"author":24,"featured_media":4569,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,216,139,142],"tags":[],"class_list":["post-4560","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-hydra-platform","category-software-development-management-processes","category-whitepapers"],"_links":{"self":[{"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/posts\/4560"}],"collection":[{"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/comments?post=4560"}],"version-history":[{"count":0,"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/posts\/4560\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/media\/4569"}],"wp:attachment":[{"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/media?parent=4560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/categories?post=4560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandbox.weareadaptive.com\/fr\/wp-json\/wp\/v2\/tags?post=4560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}