Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

NextGen Leads Auctions—Powered by NATS

DZone's Guide to

NextGen Leads Auctions—Powered by NATS

Microservices is a popular buzzword currently. But how do you actually implement a microservices architecture? This post from earlier this year by Aaron Schlosser explains more about how his team implemented a Microservices framework at NextGen Leads using NATS.

· Integration Zone
Free Resource

Share, secure, distribute, control, and monetize your APIs with the platform built with performance, time-to-value, and growth in mind. Free 90 day trial 3Scale by Red Hat

Microservices is a popular buzzword currently. But how do you actually implement a microservices architecture? How should all the composable pieces of your infrastructure communicate? 

Because of the need for all these services to function as a single entity (application, system, etc), but also to be de-coupled, a lightweight, fast, and highly scalable messaging layer is a must.

This post from earlier this year by Aaron Schlosser explains more about how his team implemented a Microservices framework at NextGen Leads using NATS. NATS is an extremely lightweight, open-source messaging system built on Golang. It provides scalability, simplicity, and performance that are ideally suited to microservices design.

If you'd like to get learn more about NATS and get involved in the NATS community, I look forward to hearing from you with any questions or input. You can also find NATS on Twitter.

----

NextGen Leads aims to provide extremely high-quality health insurance leads and Medicare supplement leads by streamlining the lead buying experience from end to end. Our leads are generated internally by a team of lead generation experts; they are not brokered by any third party. They are then delivered in real time and never oversold, passing through various filters to ensure that our customers can place bids on only those leads that they want. In fact, our unique second price auction model ensures that our customers always pay the minimum amount necessary to win a lead.

In lead generation, timing is of the essence. Mere seconds can make the difference between a hot and cold lead. As such, we chose NATS as the messaging service that would serve as the “glue” for our microservices architecture. Each of our workers, spread across a scalable number of servers, communicates with one another via our NATS infrastructure. In this manner, as we continue to grow and scale upwards, we can remain confident that our app can handle an exponentially increasing number of transactions.

Thanks to NATS, we can be certain that a lead generated in our funnel can be normalized, sent to auction, purchased, and shipped practically instantaneously. This provides our customers with a truly real time lead buying experience. We send raw lead data, as it is generated, to a normalizer that preps it for auction; then, based on the origin of the data and its unique characteristics, it is routed to one of our many different auction processes; there, our customers place bids on it; finally, the lead is routed to one of many different shipment handlers that deliver it to those customers with winning bids according to their unique delivery needs. These can range from automated CRM shippers (e.g., an XML or JSON POST to a customer’s API endpoint) all the way to human agents who connect our customers to our leads via live transfers over the telephone. At every step of the process, NATS is there to route our data to where it needs to be:

NextGen Leads' NATS-powered microservices architecture diagram

Another feature of NATS is its great simplicity. Our largely JavaScript-based stack (AngularJS on the front-end and Node.js on the back-end with RethinkDB) works seamlessly with NATS thanks to the Node.js client. The NATS server works out-of-the-box and is deployed with ease, and the API is elegant and straightforward. Training new full-stack engineers to work with NATS requires a very minimal up-front investment, which is a huge advantage for any ambitious startup.

In the end, we at NextGen Leads are glad to have chosen NATS and are looking forward to continuing to grow thanks to NATS’ scalability and ease of use! Feel free to tweet at me if you’re thinking about using NATS for your own project, or follow us at NextGenLeads to see how we continue to use NATS to scale upwards as we take on new verticals.

Discover how you can achielve enterpriese agility with microservices and API management

Topics:
microservice architecture ,microservices ,golang ,node js ,cloud native applications ,cloud native ,distributed systems

Published at DZone with permission of Brian Flannery. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}