Efficient Query Dispatching for Scale-Out Database Systems Stefan - - PowerPoint PPT Presentation
Efficient Query Dispatching for Scale-Out Database Systems Stefan - - PowerPoint PPT Presentation
Efficient Query Dispatching for Scale-Out Database Systems Stefan Klauck, Max Plauth, Sven Knebel Hasso Plattner Institute, University of Potsdam Marius Strobl, Douglas Santry, Lars Eggert NetApp Munich Internet Research Retreat
Problem space
Client 1 Client m DB Backend 1 DB Backend n
… …
(a) Direct communication. DB Backend 1 DB Backend n Dispatcher Client 1 Client m
… …
(b) Central dispatcher. Figure: Query dispatching architectures.
1 / 6
Dispatcher candidates
Hyrise Dispatcher
◮ Query load-balancer for Hyrise [6] lazy replicating in-memory DB ◮ Routes based on JSON query plan using 1 thread per client ◮ Socket API with buffering to avoid copies, nodejs/http-parser [2]
2 / 6
Dispatcher candidates
Hyrise Dispatcher
◮ Query load-balancer for Hyrise [6] lazy replicating in-memory DB ◮ Routes based on JSON query plan using 1 thread per client ◮ Socket API with buffering to avoid copies, nodejs/http-parser [2]
HAProxy
◮ “The Reliable, High Performance TCP/HTTP Load Balancer” [7] ◮ Popular, open-source, general-purpose ◮ Employs socket splicing [5] on GNU/Linux
2 / 6
Dispatcher candidates
Hyrise Dispatcher
◮ Query load-balancer for Hyrise [6] lazy replicating in-memory DB ◮ Routes based on JSON query plan using 1 thread per client ◮ Socket API with buffering to avoid copies, nodejs/http-parser [2]
HAProxy
◮ “The Reliable, High Performance TCP/HTTP Load Balancer” [7] ◮ Popular, open-source, general-purpose ◮ Employs socket splicing [5] on GNU/Linux
Prism
◮ Splits single TCP connections across servers [3] ◮ Controller reprograms SDN switch (P4 [1] or mSwitch [4]) ◮ Eliminates controller/dispatcher as central bottleneck
2 / 6
Prism
Rewrite IP Rewrite MAC Zero Window Clear Fin
Prism Controller Protocol/Request Handler Connection Hand-Off/ Hand-Back Handler Prism Switch Switch Logic Back-End Prism Interface
TCP Repair Socket to/from Clients Update HTTP Prism TCP/IP
Connection State Table
State Seq Ack ... Lookup/Insert Trigger Transform Rules Connection Hand-Off/Hand-Back Unmatched Packets Data/Ack Lookup(Src IP, Src TCP Port, ...)
Figure: Prism software architecture, based on [3].
3 / 6
Experimental setup
mSwitch Learning Bridge Mode Switch Backend 2 Hyrise DB 2 Backend 1 Hyrise DB 1 Client 2 wrk 2 Client 1 wrk 1 Load-Balancer Hyrise Dispatcher/ HAProxy
(a) Hyrise dispatcher and HAProxy topology.
4 / 6
Experimental setup
mSwitch Learning Bridge Mode Switch Backend 2 Hyrise DB 2 Backend 1 Hyrise DB 1 Client 2 wrk 2 Client 1 wrk 1 Load-Balancer Hyrise Dispatcher/ HAProxy
(a) Hyrise dispatcher and HAProxy topology.
Prism Controller viface1 mSwitch Prism Switch Module iface1 iface2 Switch Backend 2 Hyrise DB 2 Prism Server 2 Backend 1 Hyrise DB 1 Prism Server 1 Client 2 wrk 2 Client 1 wrk 1
(b) Prism topology. Figure: Topologies for the evaluations, based on [3].
4 / 6
Experimental results
1B 32B 1KiB 32KiB 1MiB 32MiB 10-4 10-2 1 1.25 2.5 5 10 20 40
Payload Throughput [Gb/s]
Prism 40 Dispatcher 40 HAProxy 40 Prism 10 Dispatcher 10 HAProxy 10
Figure: Dispatcher throughputs for varying payloads.
5 / 6
Thank you for your attention! Disclaimer:
No hardware was harmed in the making of this presentation. Two Mellanox ConnectX-3 cards died in the making of this presentation.
6 / 6
References
[1] Pat Bosshart et al. 2014. P4: Programming Protocol-independent Packet
- Processors. SIGCOMM Comput. Commun. Rev. 44, 3 (July 2014), 87–95.
[2] Node.js Foundation. [n. d.]. HTTP Parser. https://github.com/nodejs/http-parser. ([n. d.]). [3] Yutaro Hayakawa, Lars Eggert, Michio Honda, and Douglas Santry. 2017. Prism: A Proxy Architecture for Datacenter Networks. In Proceedings of the 2017 Symposium on Cloud Computing (SoCC ’17). ACM, New York, NY, USA, 181–188. [4] Michio Honda, Felipe Huici, Giuseppe Lettieri, and Luigi Rizzo. 2015. mSwitch: A Highly-scalable, Modular Software Switch. In Proceedings of the 1st ACM SIGCOMM Symposium on Software Defined Networking Research (SOSR ’15). ACM, New York, NY, USA, Article 1, 13 pages. [5] David A. Maltz and Pravin Bhagwat. 2000. TCP Splice Application Layer Proxy Performance. J. High Speed Netw. 8, 3 (Jan. 2000), 225–240. [6] David Schwalb et al. 2015. Hyrise-R: Scale-out and Hot-Standby Through Lazy Master Replication for Enterprise Applications. In Proceedings of the 3rd VLDB Workshop on In-Memory Data Mangement and Analytics (IMDM ’15). ACM, New York, NY, USA, Article 7, 7 pages. [7] Willy Tarreau. [n. d.]. The Reliable, High Performance TCP/HTTP Load
- Balancer. https://www.haproxy.org. ([n. d.]).