{"id":6218,"date":"2019-08-12T16:33:27","date_gmt":"2019-08-12T16:33:27","guid":{"rendered":"https:\/\/gtechbooster.com\/?p=6218"},"modified":"2023-06-21T11:42:55","modified_gmt":"2023-06-21T11:42:55","slug":"paypal-makes-hera-open-source","status":"publish","type":"post","link":"https:\/\/gtechbooster.com\/paypal-makes-hera-open-source\/","title":{"rendered":"PayPal makes Hera Open Source"},"content":{"rendered":"\n<p>PayPal has made HERA, its <strong>H<\/strong>igh <strong>E<\/strong>fficiency <strong>R<\/strong>eliable <strong>A<\/strong>ccess\n to data stores, open source. Hera is a data access gateway that PayPal \nuses to scale database access for hundreds of billions of SQL queries \nper day.<\/p>\n\n\n\n<div class=\"gtech-migrated-from-ad-inserter-placement-2\" style=\"text-align: center;\" id=\"gtech-4022759785\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-645459191\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/17207\" rel=\"noopener\" class=\"notrack\" aria-label=\"26001\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2023\/01\/26001.jpeg 1024w, https:\/\/gtechbooster.com\/media\/2023\/01\/26001-768x960.jpeg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"500\" height=\"625\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div><p>Hera is made up of a language-specific Hera client library that  resides on each application host and allows applications to communicate  with Hera efficiently, alongside a centralized Hera proxy service that  is fully aware of database configurations and application requirements.<\/p>\n\n\n\n<p> This service receives application requests and routes them to a chosen  database instance. The Router, Parser, &amp; Query Rewriting modules are  all part of the Hera proxy. A set of workers that are responsible for  maintaining connections to a specific database then handle communication  between the proxy and this database. Hera was originally written in C++  but has recently been rewritten in GoLang. <\/p>\n\n\n\n<p>PayPal developed Hera to scale thousands of its applications with \nconnection multiplexing, read-write split, and sharding. The product was\n developed to handle the problem PayPal found when it moved to using a \nmicroservices architecture in the application tier. This had the side \neffect of creating many application servers and an associated increase \nin pooled DB connections, with large numbers of persistent connections \nin-bound at the DB.<\/p>\n\n\n\n<p>To overcome the need for persistent connections, PayPal built a \nconnection multiplexer that could multiplex many inbound database \nconnections, most of which were idle, from the application tier to a \nsmall set of active database connections in the DB tier. This was \nimproved on with SQL parsing so it could differentiate between \ntransactional and non-transactional requests.<\/p>\n\n\n\n<p>Hera also supports a read\/write split to ensure that spikes in the \nnumber of reads don\u2019t affect write performance or vice-versa. It also \nconverts queries from applications to SQL that ensures the query is \ncompatible with sharding. Hera uses sharding to control data \nredistribution. The sharding logic is kept on the server to avoid the \nneed for individual applications to manage sharding on the client side.<\/p>\n\n\n\n<p>Hera also has a surge queue that deals with high volumes of service \nrequests. At times of high demand, requests can be put into the queue \nand processed as soon as another service request is complete. It can \nalso be configured to remove a slow query to allow multiple more typical\n queries to run.<\/p>\n\n\n\n<p>Hera&#8217;s sharding is based on Oracle RAC clusters. Several RAC clusters\n are used to mimic a single logical database, with logical shards \ndistributed over the RACs and shard routing handled by Hera. Hera uses \nshard key column bind name and value to determine how to direct queries \nto the appropriate shard. The parsing component is used to detect and \nextract the shard key from SQL Where clauses, and the routing component \nroutes queries to a database based on the shard_id extracted by the \nParsing component<\/p>\n\n\n\n<p>Hera is available on GitHub.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More Information<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/github.com\/paypal\/hera\">Hera On GitHub<\/a><\/li><\/ul>\n<div class=\"gtech-end-cont\" id=\"gtech-149991082\"><div style=\"margin-right: auto;margin-left: auto;text-align: center;\" id=\"gtech-3994521108\"><a data-bid=\"1\" data-no-instant=\"1\" href=\"https:\/\/gtechbooster.com\/linkout\/76065\" rel=\"noopener\" class=\"notrack\" aria-label=\"26002\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/gtechbooster.com\/media\/2025\/10\/26002.jpg\" alt=\"\"  srcset=\"https:\/\/gtechbooster.com\/media\/2025\/10\/26002.jpg 1200w, https:\/\/gtechbooster.com\/media\/2025\/10\/26002-768x768.jpg 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" width=\"500\" height=\"500\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>PayPal has made HERA, its High Efficiency Reliable Access to data stores, open source. Hera is a data access gateway that PayPal uses to scale database access for hundreds of billions of SQL queries per day. Hera is made up of a language-specific Hera client library that resides on each application host and allows applications [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":6237,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1915],"tags":[620,979,6],"class_list":["post-6218","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ndocs","tag-open-source","tag-paypal","tag-programming"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts\/6218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/comments?post=6218"}],"version-history":[{"count":0,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/posts\/6218\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/media\/6237"}],"wp:attachment":[{"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/media?parent=6218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/categories?post=6218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gtechbooster.com\/api-json\/wp\/v2\/tags?post=6218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}