<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by ZOOZ on Medium]]></title>
        <description><![CDATA[Stories by ZOOZ on Medium]]></description>
        <link>https://medium.com/@zoozpayments?source=rss-4acf6c759a9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*OhCW-3YT-v3qyXMU7Ebclw.png</url>
            <title>Stories by ZOOZ on Medium</title>
            <link>https://medium.com/@zoozpayments?source=rss-4acf6c759a9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:43:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zoozpayments/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[By: Niv Lipetz, Software Engineer @ ZOOZ]]></title>
            <link>https://medium.com/zooz-engineering/by-niv-lipetz-software-engineer-zooz-b5928da0b7a8?source=rss-4acf6c759a9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5928da0b7a8</guid>
            <category><![CDATA[performance-testing]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[zooz]]></category>
            <category><![CDATA[predator]]></category>
            <category><![CDATA[open-payments]]></category>
            <dc:creator><![CDATA[ZOOZ]]></dc:creator>
            <pubDate>Wed, 06 Feb 2019 20:10:33 GMT</pubDate>
            <atom:updated>2019-02-06T20:20:43.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AVJjrarPEm-0bsILVCRRmg.png" /></figure><p>By: <a href="https://medium.com/u/88b791842376">Niv Lipetz</a>, Software Engineer @ <a href="https://medium.com/u/4acf6c759a9c">ZOOZ</a></p><p><strong>RPS — </strong>Requests per second, request latency, and overall system performance and reliability are some fundamental concepts that need to be taken into account when designing a high capacity API. With CI/CD becoming a common deployment methodology, deployments to production are a constant occurrence. How can we ensure that the core capabilities we initially designed our system with to have remained intact?</p><p>We built <strong>Predator.</strong></p><blockquote>Predator is an open-source performance framework we created for ourselves. We were fed up with the limitations of out-of-the-box solutions and the complication of writing complex custom tests. We designed Predator to manage the entire lifecycle of stress-testing a server, from creating a test file, to running scheduled and on-demand tests, and finally viewing the test results. Bootstrapped with a user-friendly UI alongside a simple REST API, Predator helps developers simplify the performance testing regime.</blockquote><h3>Why In-House?</h3><p>Initially, Blazemeter was our framework of choice. Able to run JMeter files and easily create heavy server load, it provided us with a decent solution. Nevertheless, the limitation of runners and the complication of writing tests that simulate our merchants’ flows caused us to search for new solutions. We were missing a framework that would provide an end-to-end solution that would be both economic and rich in features.</p><p>This is when we at ZOOZ — a technology company after all — decided to develop Predator as our end-to-end solution that would satisfy our needs. Our aim was to simplify performance testing and provide enough metrics to help us isolate performance problems.</p><p>We chose to use Artillery <a href="https://github.com/artilleryio/artillery">https://github.com/artilleryio/artillery</a> as our engine for running load using HTTP requests in Predator tests.</p><h3>Must-Have Features</h3><p>Our decision to internally develop our own framework gave us the privilege to design Predator exactly the way we needed. Some of the include features:</p><p><strong>1. Domain Specific Language</strong></p><p>Writing a performance test that checks specific parts of our API end-to-end used to be a hassle, but now it is effortless. By creating definitions for each DSL, request templates are generated. These can be reused in the same test and in other tests under the same DSL type, reducing replication. Also, by using Artillery syntax, response values can be captured and used in the rest of the pre-defined definitions, enabling the DSL definitions to be dynamic. Overall, this feature allows us to create scenarios that truly mimic our merchants’ flows with little effort and a minimal amount of time.</p><p><strong>2. API Functional Testing</strong></p><p>DSL is important for testing the product as a whole, but the performance problem can usually be pinpointed to a smaller source, such as a buggy feature or service. For this reason, API Functional Testing is included. Writing a test flow that targets an array of endpoints with the ability to extract response values to use in later requests is as straightforward as it can be.</p><p><strong>3. Live Reporting</strong></p><p>Seamless integration with Prometheus, InfluxDB, and Grafana enables the creation of custom dashboards and metrics, thus adding another important dimension to the test results. Moreover, Predator generates a native HTML report, providing a sleek report interface. These are updated constantly throughout the test run with the test’s real-time results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5FdwMEbTU5VKoSdjhMLIw.jpeg" /><figcaption>Custom Grafana dashboard integrated with Prometheus plugin</figcaption></figure><p><strong>4. Multi-Database</strong></p><p>Test history and data retention are critical when analyzing a system’s performance over time. These, however, can get pricey when using cloud-based frameworks. With support for both relational databases (SQLite, MSSQL, MySQL, Postgres) and NoSQL databases (Cassandra), saving past test results are included out-of-the-box. Data retention is based on the user’s database configuration.</p><p><strong>5. Multi-Platform</strong></p><p>Before Predator, running two or more tests simultaneously was limited due to third party limitations. Now, we are able to scale tests using our own resources. With support for both Kubernetes and Metronome, all a user needs to do is provide the platform configuration, sit back, and let Predator deploy runners that load the user’s API from their chosen platform. A local deployment adapter is also included, allowing deployment of runners in the user’s local machine.</p><p><strong>6. User Interface<br></strong>Predator is bootstrapped with a UI that consolidates this framework into one user-friendly interface alongside a simple REST API to create, run, and view tests along with their results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsvELwsdo9brd7adlLui_Q.jpeg" /></figure><p>The following features guided us throughout our development, and they shape the core ideology of Predator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3C662kq7wTivE-SwWiWxPg.png" /><figcaption>Feature Comparison Table</figcaption></figure><h3>Loading Our System</h3><p><strong>1. Nightly Tests:</strong></p><p>Multiple deployments a day to different parts of a codebase can potentially harm the system’s performance. To protect ourselves, we configured Predator to perform nightly tests via a cron mechanism. These tests ensure that the entire system is hit end-to-end.</p><p><strong>2. Test On-Demand:</strong></p><p>Whether a developer needs to test a feature in isolation or an enhancement before deployment, or whether a system administrator needs to simulate a certain stress load in a development environment, Predator provides the ability to run an immediate test.</p><p><strong>3. Part of a CI/CD pipeline</strong>:</p><p>As part of the effort to minimize performance regression, the true responsibility is on the sole-service to make sure it does not deploy any bugs. By running performance tests as a step in a CI/CD pipeline, developers can make sure their deployment is bug-free in terms of a performance footprint.</p><h3>What’s Next?</h3><p>Ever since we integrated performance testing into our daily routine, improvements in our system’s performance have increased drastically. We will share the fine-tunings that worked for us in our next blog post, as well as how we diagnosed our system’s weak spots and the actions we took to overcome them.</p><blockquote><strong>Moreover, we believe what helped us will help others. This led us to open-source Predator, with a scheduled release date at the end of March 2019,</strong></blockquote><h4><a href="https://info.zooz.com/predator">Sign up for updates on Predator’s release</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5928da0b7a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zooz-engineering/by-niv-lipetz-software-engineer-zooz-b5928da0b7a8">By: Niv Lipetz, Software Engineer @ ZOOZ</a> was originally published in <a href="https://medium.com/zooz-engineering">ZOOZ Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Beginning of Predator]]></title>
            <link>https://medium.com/@zoozpayments/the-beginning-of-predator-97510989ad89?source=rss-4acf6c759a9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/97510989ad89</guid>
            <category><![CDATA[zooz]]></category>
            <category><![CDATA[predator]]></category>
            <category><![CDATA[performance-testing]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[ZOOZ]]></dc:creator>
            <pubDate>Wed, 06 Feb 2019 13:37:41 GMT</pubDate>
            <atom:updated>2019-02-06T20:23:56.265Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AVJjrarPEm-0bsILVCRRmg.png" /></figure><h3>The Rise of Predator</h3><p>By: <a href="https://medium.com/u/88b791842376">Niv Lipetz</a>, Software Engineer @ <a href="https://medium.com/u/4acf6c759a9c">ZOOZ</a></p><p><strong>RPS —</strong> Requests per second, request latency, and overall system performance and reliability are some fundamental concepts that need to be taken into account when designing a high capacity API. With CI/CD becoming a common deployment methodology, deployments to production are a constant occurrence. How can we ensure that the core capabilities we initially designed our system with to have remained intact?</p><p>We built <strong>Predator.</strong></p><blockquote>Predator is an open-source performance framework we created for ourselves. We were fed up with the limitations of out-of-the-box solutions and the complication of writing complex custom tests. We designed Predator to manage the entire lifecycle of stress-testing a server, from creating a test file, to running scheduled and on-demand tests, and finally viewing the test results. Bootstrapped with a user-friendly UI alongside a simple REST API, Predator helps developers simplify the performance testing regime.</blockquote><h3><strong>Why In-House?</strong></h3><p>Initially, Blazemeter was our framework of choice. Able to run JMeter files and easily create heavy server load, it provided us with a decent solution. Nevertheless, the limitation of runners and the complication of writing tests that simulate our merchants’ flows caused us to search for new solutions. We were missing a framework that would provide an end-to-end solution that would be both economic and rich in features.</p><p>This is when we at ZOOZ — a technology company after all — decided to develop Predator as our end-to-end solution that would satisfy our needs. Our aim was to simplify performance testing and provide enough metrics to help us isolate performance problems.</p><p>We chose to use Artillery <a href="https://github.com/artilleryio/artillery">https://github.com/artilleryio/artillery</a> as our engine for running load using HTTP requests in Predator tests.</p><h3><strong>Must-Have Features</strong></h3><p>Our decision to internally develop our own framework gave us the privilege to design Predator exactly the way we needed. Some of the include features:</p><p><strong>1. Domain Specific Language</strong></p><p>Writing a performance test that checks specific parts of our API end-to-end used to be a hassle, but now it is effortless. By creating definitions for each DSL, request templates are generated. These can be reused in the same test and in other tests under the same DSL type, reducing replication. Also, by using Artillery syntax, response values can be captured and used in the rest of the pre-defined definitions, enabling the DSL definitions to be dynamic. Overall, this feature allows us to create scenarios that truly mimic our merchants’ flows with little effort and a minimal amount of time.</p><p><strong>2. API Functional Testing</strong></p><p>DSL is important for testing the product as a whole, but the performance problem can usually be pinpointed to a smaller source, such as a buggy feature or service. For this reason, API Functional Testing is included. Writing a test flow that targets an array of endpoints with the ability to extract response values to use in later requests is as straightforward as it can be.</p><p><strong>3. Live Reporting</strong></p><p>Seamless integration with Prometheus, InfluxDB, and Grafana enables the creation of custom dashboards and metrics, thus adding another important dimension to the test results. Moreover, Predator generates a native HTML report, providing a sleek report interface. These are updated constantly throughout the test run with the test’s real-time results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5FdwMEbTU5VKoSdjhMLIw.jpeg" /><figcaption>Custom Grafana dashboard integrated with Prometheus plugin</figcaption></figure><p><strong>4. Multi-Database</strong></p><p>Test history and data retention are critical when analyzing a system’s performance over time. These, however, can get pricey when using cloud-based frameworks. With support for both relational databases (SQLite, MSSQL, MySQL, Postgres) and NoSQL databases (Cassandra), saving past test results are included out-of-the-box. Data retention is based on the user’s database configuration.</p><p><strong>5. Multi-Platform</strong></p><p>Before Predator, running two or more tests simultaneously was limited due to third party limitations. Now, we are able to scale tests using our own resources. With support for both Kubernetes and Metronome, all a user needs to do is provide the platform configuration, sit back, and let Predator deploy runners that load the user’s API from their chosen platform. A local deployment adapter is also included, allowing deployment of runners in the user’s local machine.</p><p><strong>6. User Interface<br></strong>Predator is bootstrapped with a UI that consolidates this framework into one user-friendly interface alongside a simple REST API to create, run, and view tests along with their results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsvELwsdo9brd7adlLui_Q.jpeg" /></figure><p>The following features guided us throughout our development, and they shape the core ideology of Predator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3C662kq7wTivE-SwWiWxPg.png" /><figcaption>Feature Comparison Table</figcaption></figure><h3><strong><em>Loading Our System</em></strong></h3><p><strong>1. Nightly Tests:</strong></p><p>Multiple deployments a day to different parts of a codebase can potentially harm the system’s performance. To protect ourselves, we configured Predator to perform nightly tests via a cron mechanism. These tests ensure that the entire system is hit end-to-end.</p><p><strong>2. Test On-Demand:</strong></p><p>Whether a developer needs to test a feature in isolation or an enhancement before deployment, or whether a system administrator needs to simulate a certain stress load in a development environment, Predator provides the ability to run an immediate test.</p><p><strong>3. Part of a CI/CD pipeline</strong>:</p><p>As part of the effort to minimize performance regression, the true responsibility is on the sole-service to make sure it does not deploy any bugs. By running performance tests as a step in a CI/CD pipeline, developers can make sure their deployment is bug-free in terms of a performance footprint.</p><h3><strong>What’s Next?</strong></h3><p>Ever since we integrated performance testing into our daily routine, improvements in our system’s performance have increased drastically. We will share the fine-tunings that worked for us in our next blog post, as well as how we diagnosed our system’s weak spots and the actions we took to overcome them.</p><blockquote><strong>Moreover, we believe what helped us will help others. This led us to open-source Predator, with a scheduled release date at the end of March 2019,</strong></blockquote><h4><a href="https://info.zooz.com/predator">Sign up for updates on Predator’s release</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97510989ad89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How many languages do you speak?]]></title>
            <link>https://medium.com/zooz-engineering/how-many-languages-do-you-speak-d0056583691f?source=rss-4acf6c759a9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0056583691f</guid>
            <category><![CDATA[go]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[kafka]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[ZOOZ]]></dc:creator>
            <pubDate>Tue, 06 Nov 2018 16:26:26 GMT</pubDate>
            <atom:updated>2018-11-07T12:14:16.649Z</atom:updated>
            <content:encoded><![CDATA[<p>By: Meytal Segal, Tech Lead @ZOOZ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9NoXuP2Fb01wnFn3Fmqtag.png" /><figcaption>How many languages do you code?</figcaption></figure><p>We all try to learn new languages. When we visit different countries with different languages, we try to learn some words in their local language. We try to communicate with the locals. Sometimes it’s part of the experience and a challenge when the locals know only one language, their own. So we adapt and learn their language for the success of our trip.</p><p>What about programming languages? How many of those do you know? Have you tried learning more than one? Are there any cases when one language is preferred over another? Or is it more important to be an expert in one programming language, to maintain technological consistency within the company or to fit the technology to the scenario?</p><h3>Choosing your language</h3><p>At ZOOZ we built our system on a microservices architecture. So it doesn’t really matter in which language the service is written, the communication is done via API calls. This means each service can be coded in a different language.</p><p>Our legacy system is a huge monolith written in Java. When architecting our newly built microservices system, we decided to evaluate a switch to a different language. We wanted our services to have small footprints, easy to bootstrap and maintain, with a short learning curve and a large active community.</p><p><strong>So we started on a quest to find the best language for our needs.</strong></p><p>The first “test-run” services were written in Scala, go and node.js. That allowed us to experiment and learn the basics of each language — while evaluating which languages best meet our aforementioned criteria.</p><p>With time, Javascript and node.js became our preferred technologies to write microservices. We started to write inner shared packages and had our own internal npm repository. Node.js is light and has a large community, so it is easier and faster to develop new features. As for Scala, it is very similar to Java and has its own complexities, so our usage of it is limited.</p><p>However, despite this current preference, when a new service comes along we also consider the coding language we want to use (this is always part of the design phase).</p><p><strong>There is no automatic decision to go the node.js way.</strong></p><p>For instance, recently we had to write a new major service which utilizes Kafka. However, we encountered many issues with Kafka-node, the Kafka driver for node.js. One of the issues encountered was the inability to recover after the broker is down — in which case the consumers got stuck and the producers could not write.</p><p>We also noticed that the Kafka driver we were using was not maintained and had a lot of open issues. We could not afford ourselves to use a poorly maintained Kafka driver with a lot of open issues for this new critical service.</p><p>So why not fix the driver ourselves and hand it back to the community? That’s what node.js is all about! It looked like this package was abandoned a long time ago and had a pretty lost list of open issues. We estimated we didn’t have the capacity and specific expertise to revive it.</p><p><strong>We decided to find the best technology for the service.</strong></p><p>If we were to look for new node.js packages, why not check other languages as well? After some research and gathering knowledge from within the company, it resulted in two finalists for us to test — Python and Scala.</p><p>Both languages have well maintained drivers. Python is considered an easy language to learn. However, it is more complex to support concurrent transactions in Python and we didn’t have much time to invest in research. Additionally, the knowledge we had in the company, led us to believe it is not the best fit for the solution. Also, Scala has two strong web application frameworks “Play” and “Spring”. That required more research in order to choose one of them. So we decided to narrow down the research and focus on Scala. Eventually we chose to implement the service in Scala with “Play”.</p><blockquote>We wanted to broaden our knowledge and make the right choice for each service, but the research was limited in time. We had to consider not only he technological needs but also the business needs of the company.</blockquote><p>By knowing multiple languages, we can contribute to the open source projects we are using. For example, knowing Java, we were able to contribute to Kafka. We found an issue with the brokers discovery in Kafka, fixed it and submitted a pull request*.</p><p>Knowing Go allowed us to contribute to the Vault project by HashiCorp. In the latest version they required using super user, which does not meet our security requirements. After consulting with HashiCorp, we decided to submit a pull request to fix it.</p><p>Writing microservices in different languages has some challenges — mostly around maintaining the services or adding new features. Not all of the developers “speak” all the languages. In such cases, the developers need to learn the language before working on a task in an unfamiliar language. This obviously adds complexity to the task, but on the other hand, keeps our developers challenged and helps them grow and gain more skills.</p><h3>What about modifying existing microservices?</h3><p>We received a request for a new feature that required us to modify several microservices, written in node.js and typescript. This feature also included UI modifications in React.</p><p>Although all the affected microservices technologies were Javascript-based, it still had a learning curve for the engineers working on the feature.</p><blockquote>Each language has a different architecture and its own intricacies. It’s like knowing Spanish and being able to understand other latin languages, but not actually being able to speak them fluently.</blockquote><p>The team was very excited for the opportunity to learn new languages (typescript and React) and eager to face the challenges that came along with them.</p><h3>The learning curve</h3><p>In practice, this meant we had to allocate some learning time at the beginning of each task.</p><p>However, for some tasks we did not allocate enough time in the assumption that adding our simple code wouldn’t be too complicated. Reality was different though.</p><p>We also assumed that typescript is very similar to Javascript and node.js. We were wrong about that, which led to a delay in our timelines. This experience taught us not to underestimate the cost of moving between different languages.</p><blockquote>Each language has its own nuances, and it’s critical to get to know them. When you want to do things right, take the time to learn. Exactly like when you come to a new country with a language that is foreign to you — you don’t want to accidentally swear at the people you meet…</blockquote><p>Working in an environment of multiple languages, keeps the developers in a constant learning mode, allowing them to develop new skills. Such environment offers many challenges and opportunities, for better or worse.</p><p>Using the best technology for the scenario can help you write better code that will be ideal for your needs. Using a language that is new to you, will have some overhead. That should not stop you from using it, if it is the right thing to do. But don’t forget the learning process to get there effectively.</p><p>Visit us at <a href="http://www.zooz.com/">www.zooz.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0056583691f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zooz-engineering/how-many-languages-do-you-speak-d0056583691f">How many languages do you speak?</a> was originally published in <a href="https://medium.com/zooz-engineering">ZOOZ Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This Is How We Kong]]></title>
            <link>https://medium.com/zooz-engineering/this-is-how-we-kong-c3dcf375f55d?source=rss-4acf6c759a9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3dcf375f55d</guid>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[kong]]></category>
            <category><![CDATA[zooz]]></category>
            <dc:creator><![CDATA[ZOOZ]]></dc:creator>
            <pubDate>Tue, 23 Oct 2018 13:32:56 GMT</pubDate>
            <atom:updated>2018-11-07T12:15:04.555Z</atom:updated>
            <content:encoded><![CDATA[<p>By: Shai Moria, Software Engineer @zooz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtvNWTFamoc9Th4CldlInQ.jpeg" /></figure><p>When we first started building PaymentsOS, ZOOZ’s open payments platform, we needed a quick and reliable solution for our API gateway. Eventually, we decided to go with a 3rd party service that looked very suitable for us at the time.</p><p>As PaymentsOS evolved, things became more complicated. The time it took for new features to become ‘production-ready’ was getting longer and longer and maintaining existing code had become a very difficult task.,In addition, we used Javascript for additional flexibility, even though the way we used it ran <strong>counter to the best</strong> practices defined by the 3rd party service. On top of that, we experienced downtime on several occasions, which we could not control since we were using a 3rd party solution. This led us to search for an alternative.</p><p>We decided the alternative should satisfy the following conditions:</p><ol><li>‘In house solution’ — all the code base should be stored on our infrastructure and servers so that we have maximum control over everything that happens.</li><li>It must be a very fast gateway in order to quickly process our requests.</li><li>Test infrastructure should be easy to develop and maintain.</li><li>Can horizontally scale easily.</li><li>Code maintenance should be as simple as possible.</li><li>Ability to expand the gateway functionality easily.</li></ol><p>After evaluating our options, we selected the <a href="https://konghq.com/">Kong</a> open source project.</p><p>Kong is an Open Source Microservice API Gateway developed by Kong Inc. Kong, which is built on top of nginx. It allows developers to reduce complexity and deployment times when implementing an API solution. Nginx is a web server which can also be used as a reverse proxy or a load balancer.</p><p>After we studied a bit about how Kong works and how to custom dockerize it in a container, we performed load tests inside our pre-production environment. The load tests passed with great success and without much effort from Kong. As I mentioned earlier, Kong is built on top of nginx which has the ability to handle more than 10,000 simultaneous connections with a low memory footprint (~2.5 MB per 10k).</p><p>The second thing we did, was to start building all the necessary functionality that is used by all our micro gateways. Kong is a lua application designed to load and execute lua modules and therefore you can build ‘custom plugins’ that execute for every request and/or response passing through Kong in a predetermined order. Some examples of the custom plugins we built include: Authentication plugin, Logging plugin, Error Handling plugin, API Versioning Mapper plugin and more.</p><p>In PaymentsOS, we use Akamai CDN as the entry point. This means that every request in our system first passes through Akamai before entering PaymentsOS. When we look at the big picture of our architecture using the 3rd party gateway, it looks something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xWWH2IUe3Wa1R19DwoIAKw.png" /><figcaption>Fig 1 — Before Kong</figcaption></figure><p>As shown in the figure above, each request passes through Akamai and the gateway before entering the production environment. We took advantage of this architecture to gradually shift all the traffic from the 3rd party gateway into Kong (which now lives inside the production environment as a service) as shown in the figure below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w52uYdP-4FfwZ38Z_IPrlA.png" /><figcaption>Fig 2 — After Kong</figcaption></figure><p>In this manner, we could slowly shift all proxies one by one until all traffic goes straight to Kong, after which we could close the 3rd party gateway.</p><p>In the next blog on this topic, we will take a deep dive into how we build all the custom plugins and dockerize the Kong inside a container.</p><p>Visit us at www.zooz.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3dcf375f55d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zooz-engineering/this-is-how-we-kong-c3dcf375f55d">This Is How We Kong</a> was originally published in <a href="https://medium.com/zooz-engineering">ZOOZ Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>