{"id":59902,"date":"2022-03-29T11:51:33","date_gmt":"2022-03-29T09:51:33","guid":{"rendered":"https:\/\/eiposgrados.com\/?p=59902"},"modified":"2022-04-05T17:55:07","modified_gmt":"2022-04-05T15:55:07","slug":"scylladb","status":"publish","type":"post","link":"https:\/\/eiposgrados.com\/eng\/python-blog\/scylladb\/","title":{"rendered":"Discover ScyllaDB, the NoSQL database"},"content":{"rendered":"<p>ScyllaDB is a <strong>NoSQL database compatible with Apache Cassandra<\/strong> and that is distinguished because each node supports millions of operations per second, with predictably low latency. Achieving such an advantage in speed is due to the fact that it uses a <strong>fully asynchronous programming model<\/strong> and which shares nothing, relies on its own memory allocators and meticulously schedules all its I\/O requests.<\/p>\n\n\n\n<h2 class=\"gb-headline gb-headline-5665b08a gb-headline-text\"><strong>Advantages of ScyllaDB<\/strong><\/h2>\n\n\n\n<p>Scylla has some additional advantages:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Has <strong>better performance<\/strong> (2 to 8 times) than even the latest version of Cassandra.<\/li><li>The <strong>costs are lower <\/strong>especially because it saves time in administration, due to its lower complexity. For this reason, it is an alternative and replaces Apache Cassandra with great advantages.&nbsp;<\/li><li>Another great advantage is its <strong>migration capabilities<\/strong> From the latter they make both databases fully compatible. They both have the same CQL interface, queries, controllers, and even the same format <em>SSTable (Sorted Strings Table) <\/em>On the disk.&nbsp;<\/li><li>The advantage is that we will have an architecture designed to <strong>eliminate performance problems<\/strong>, limitations and operational barriers of Cassandra.<\/li><\/ul>\n\n\n\n<h2 class=\"gb-headline gb-headline-c5cc43e2 gb-headline-text\"><strong>ScyllaDB vs Seastar<\/strong><\/h2>\n\n\n\n<p>ScyllaDB uses <strong>seastar<\/strong> to fragment requests on each core. The application only has <strong>a <\/strong><strong><em>thread<\/em><\/strong><strong> per core<\/strong>. And how is this? When a session is being handled by core 1 and a query request for that session arrives at core 2, this request is directed to core 1 for processing. In this situation, either core can handle the response. In this way of working, where <strong>nothing is shared<\/strong>, there is a <strong>performance improvement<\/strong>, Since each <em>thread <\/em>has its own memory queues, CPU and buffer management <em>NIC (<\/em><em>Network Interface Card<\/em><em>)<\/em>.<\/p>\n\n\n\n<p>In cases where communication between cores cannot be avoided, the <strong>F<\/strong><strong><em>ramework<\/em><\/strong><strong> Seastar offers asynchronous communication<\/strong> between several cores that is <strong>highly scalable.<\/strong>&nbsp;<\/p>\n\n\n\n<p>When a row is found in a <em>SSTable<\/em>, must be sent over the network to the client. This involves copying data from user space to kernel space. However, Linux often performs blocking operations <em>multithread<\/em> which are not scalable. ScyllaDB takes care of it <strong>through the network stack <\/strong><strong><em>framework <\/em><\/strong><strong>Seastar.<\/strong> Network stack runs in user space and uses DPDK <em>(Data Plane Development Kit) <\/em>for faster packet processing. DPDK bypasses the kernel to copy data directly to the <em>buffer<\/em> of NIC and processes a packet within approximately 80 CPU cycles.&nbsp;<\/p>\n\n\n\n<h2 class=\"gb-headline gb-headline-855e46fa gb-headline-text\"><strong>ScyllaDB and the page cache<\/strong><\/h2>\n\n\n\n<p>Page caching is fine when you have sequential I\/O and the data is stored on disk in <em>wired<\/em>. However, <strong>in Scylla\/Cassandra<\/strong>, <strong>we have data in the form of <\/strong><strong><em>SSTables<\/em><\/strong>. Page cache stores data in the same format which takes up a lot of memory for small data and needs serialization\/deserialization when you want to transfer it and this can be a problem as we will see later.<\/p>\n\n\n\n<p><strong>ScyllaDB does not depend on page cache<\/strong>, allocates most of its memory to the row cache. <em>Row-Cache <\/em>(row cache) has the data in a memory format that is optimized, taking up less space and does not need serialization or deserialization. This makes it very secure, since serialization is a process of translating data structures into a format that can be stored and reconstructed later. Deserialization is transforming serialized data from a file, stream or network socket into an object, and it is in this last process where the vulnerability lies.<\/p>\n\n\n\n<p>For all these reasons, depending on what you are looking for, Scylla <strong>It must be taken into account when high execution speeds are needed.<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>Learn the advantages of using ScyllaDB, this NoSQL database compatible with Apache Cassandra. Click and discover this information of interest.<\/p>","protected":false},"author":90,"featured_media":59905,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[407,142],"tags":[],"class_list":["post-59902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-python","category-blog"],"acf":[],"_links":{"self":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/59902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/comments?post=59902"}],"version-history":[{"count":0,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/59902\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media\/59905"}],"wp:attachment":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media?parent=59902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/categories?post=59902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/tags?post=59902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}