Hey dev peeps! How is your life? I hope you all are doing good...Today I came with another interesting article. it's about Micro-Services

You may have already known about micro services. So, I'm not going to explain what it is. But I will go through a way to implement s clean architecture microservice setup with Eureka which is the platform provided by Netflix.

NOTE:

This article will only go through with the explanation of setup and in the upcoming articles, I will show how to implement this setup with a real-world example...


What is Eureka?

Eureka is an interjection used to celebrate a discovery or invention. It is a transliteration of an exclamation attributed to Ancient Greek mathematician and inventor Archimedes.


What is Netflix Eureka?

Netflix Eureka is a REST based middleware designed for the discovery and load balancing of web applications. So, with the use of Eureka, we can register our microservices(Eureka clients) into one place(Eureka server) and see them active or not. Actually, it's acting like a phone number directory!!


Architecture Setup


Let's look into the setup in a nutshell with a diagram. See the below image and let me explain then. 

Scenario:

Here I will take two microservices called employee service and department service. In this system, we have employees and each employee is assigned to a department. Both services are managing their own domain context. So, we have to build a bridge between two domains to collect data.



Is it complex to understand?? I hope it's not. Let's take the most important ones.


Request

This can be an API call that comes to one of the services. It can be one of the following examples.

  • Fetch all employees
  • Create an employee
  • Fetch employees in a specific department
  • Fetch all departments
  • Fetch department details of an employee


Eureka Service Registry

This is the server known as Eureka Server: discovery server. So, both the microservices showed are connected to this server. When microservices are up and running, eureka will show them when we navigate to the eureka discovery endpoint from a web browser.


API Gateway

This is the middleman between API requests and Microservices. Any request that comes to any of the two microservices, will be going through this server first. We have to configure this server in a way to distinguish the microservices by endpoint pattern. In the diagram, I have made separate endpoint prefixes like "employees" and "departments". So, we should implement all the endpoints with these prefixes in the microservices.


Config Server

This has the responsibility to fetch common configurations for the services when services are up. We may have the same config setup section in each application.yml file, in the services registered to Eureka. So, we can put that config in a common place like GITHUB and fetch. Then microservices can talk to this config server and get the config from it. This reduces the work that needs to be done when the common configs are changing!


ELK Stack

Do you know what ELK means? That means ElasticSearch, Logstash, and Kibana! So, I have connected ELK to create a centralized logging setup for the microservices. Logs are very important to track service behaviors/anomalies in the real world. All these 3 should be installed locally to connect with the microservices. 

  • ElasticSearch will let us create index patterns to store the log data.
  • Logstash will let us configure services logs in a way to connect with ES.
  • Kibana will let us see the logs in a kind of dashboard.

I think this is the most interesting part to learn in the setup...


Database

I will use mongo DB as the database connected to microservices. Here, two separate databases are connected following microservice fundamentals.


This is the simple explanation guys! Isn't it sound interesting? 


This is the tech stack including platforms/tools/libraries to be used in the upcoming implementation. Make sure you have downloaded and installed all the required software for this.

Tech Stack

  • Service backend: Java - SpringBoot
  • Database: MongoDB
  • Logging: slf4j, ELK
  • POJOs: Lombok
  • API Testing: Postman
  • Config: GIT


Thanks for coming here and read my article. If you are interested, you can give me feedback!


Until I come back, goodbye and stay safe!!!





83 Comments

  1. Besides the platforms already mentioned, Java is also used to develop software for Linux, Mac OS X, Solaris, embedded systems and even games consoles. To apply for remote java developer jobs, one must know these. Anyway, thanks for the informative blog. This would be helpful for beginners in Java.

    ReplyDelete
  2. When you have all these questions running in your head, you can dial QuickBooks Customer Service & Support Phone Number +1 855-444-2233 and talk to someone who will help you out through live chat.

    ReplyDelete
  3. I find it useful is the ability to call Quickbooks phone numbers for help. This can be done by dialing Quickbooks Customer Service Support Phone Number +16023251557 When you do, you will reach the customer service team, who will be able to provide assistance with any question or issue that you may have.

    ReplyDelete
  4. Nice Blog Sir, I find evergreen content brings the most success as a blogger.
    Sir if you are interested in Indian Share Market Intraday Trading Tips So please Visit Shristocktips.com
    We provide research in Equity, F&O, Nifty, Banknifty, Option, Investment.

    ReplyDelete
  5. If you're looking for help in using it, just dial Quickbooks Customer Service +1 855-675-3194 to speak with a live representative.

    ReplyDelete
  6. Hey!Amazing work. With full of knowledge. Our Team resolve any glitches occurring while utilizing the software. Looking for Quickbooks Customer Service Number Contact us : +1 888-210-4052.Our experts will assist you to fulfil your accounting needs. The solutions are accurate and time-saving.

    ReplyDelete
  7. QuickBooks customers can dial a toll-free Quickbooks Customer Service +1 855-885-5111 to get answers to their questions. The phone line is free and the live operators are trained to handle many QuickBooks-related issues.

    ReplyDelete
  8. Drones are being used for lots of different kinds of work these days, as well as leisure activities—people are even using drones to help be better at fishing, believe it or not.
    Here is our list of the top seven commercial and professional drones
    on the market, with specs and details included.

    ReplyDelete
  9. Thanks a lot for giving us such a helpful information. You can also visit our website for imt ghaziabad assignments solved

    ReplyDelete
  10. Whether you are just starting your company, working with a new vendor or just want to learn more about how QuickBooks works, dial<a href="https://local.google.com/place?id=6409878237497172109&use=srp&_ga=2.267224078.1288028840.1622973981-886592857.1622973981”> QuickBooks Support Phone Number</a> +1 888-210-4052 for help along the way.

    ReplyDelete
  11. Quickbooks customer service is best saved for when the company is unavailable,
    so you should start by dialing QuickBooks Customer Service +1 888-471-2380 ,ID. This number connects to their central call center where they try to help people out with the most basic of questions.

    ReplyDelete
  12. If you're looking for the best Dell service center in Indirapuram, Ghaziabad, then you've come to the right place. This service center is able to fix a variety of laptop problems, including flickering, white screens, and more. In addition, they can help you upgrade your system for a fraction of the cost of a new Dell. If you have any questions about the service center, contact them by phone at 7042640351
    Dell Service Center Indirapuram

    ReplyDelete
  13. Manual testing is a traditional method of testing. Software testers have to write test cases and then execute them manually. Manual tests are very useful in finding basic functional issues in the software being tested, for example in finding out what can be done on each screen, or even in the application being used by the user. Lasts long enough or not. Click to read this article : Manual Testing and software testing

    ReplyDelete
  14. Thanks for sharing this informative content. Meanwhile We are BIC Construction is one of Sydney leading residential construction companies that build custom architecturally designed homes. We provide Types of services like
    Architectural Home Builders
    Home Renovation Specialists Sydney
    First Floor Additions

    ReplyDelete
  15. I am very happy when read this blog post because blog post written in good manner and write on good topic. Thanks for sharing valuable information.

    On Demand Service Apps For Android and iOS are highly in demand as through this online platform. Would you like to earn money by launching an On Demand Babysitter App? If Yes, then feel free to Reach us.

    ReplyDelete
  16. Best coaching classes for neet preparation I have ever seen in patna.
    Ambroz academy not only teaches but also get connected with the students.
    The most important thing about ambroz academy is that they always keep the students motivated.

    ReplyDelete
  17. Dell service center in Dwarka is the one where you really want to call a repairman to your home or need to take your Dell thing for a maintenance center. Dell has an Dell service center focus help and reinforces page that you can visit to get free Dell support, yet the page simply gives a substance assistant. This can be fairly questionable if you're not unnecessarily familiar with PC terms or if you are exorbitantly found, making it difficult to do it isolated. We plan to fulfill every client's pocket, and we fathom that your helpful contraption is one the most basic things you guarantee, it can hold essential data. You can visit Dell service center in Dwarka for more assistance.
    Dell service center in dwarka

    ReplyDelete
  18. Awesome Blog! Thanks for sharing this post. It is an interesting post for everyone. When i read about this post then got more information. I like it.

    ESD Gloves

    Nitrile Gloves

    ESD Table Mat

    ReplyDelete
  19. Such a wonderful blog it contains some good knowledge and topics thank you for this informative post keep doing this work also check out this one International school in Faridabad

    ReplyDelete
  20. There are many donation sites that offer different benefits and opportunities. To find the best one for you, consult a hospital bed donation site’s website or contact the charity directly. Some of the most popular donation sites include Care2, Red Cross, and Human Appeal.

    ReplyDelete
  21. where to get 500 dollars fast You’re getting good at this, making money how can i earn 300 dollars fast we’ll take a look at how to make money fast and easily, with a focus on the long-term implications.

    ReplyDelete
  22. Thank you for this post it really helps me a lot to understand new things keep doing this work also check out this Best Hemorrhoids Surgeon in Delhi NCR

    ReplyDelete
  23. Thanks!It really helps me a lot.https://aswebworks.com/digital-marketing-training-in-pune/

    ReplyDelete
  24. Thank you for this informative post it really helps me a lot to understand new things keep doing this work also have a look on this Female Infertility Treatment In Faridabad

    ReplyDelete
  25. Thanks for sharing such an informative article. Keep sharing Keep giving us the food for thoughts.

    ReplyDelete
  26. Great article! Thanks for sharing. We will be returning not long from now.
    Best uk visa consultants in Hyderabad

    ReplyDelete
  27. Education at international boarding schools for girls in India also includes the development of ethics and morality, which are important in the professional realm. It is also critical to a country's progress. If a country has both financial and human resources, but no human resources to use the financial resources effectively, development falls over the cliff. Schooling has an influence on both an individual's and a country's growth and development.

    ReplyDelete
  28. Establishing business reporting with SAP S/4HANA requires a structured approach that involves defining your reporting requirements, designing your reporting architecture, building your reports, validating your reports, establishing governance and security, and monitoring and optimizing your reports. By following these steps, you can leverage the powerful reporting and analytics capabilities of SAP S/4HANA to make informed decisions, drive growth, and achieve your business goals. For more information, visit SAP analytics cloud consulting @ 1-289-952-8845.

    ReplyDelete
  29. Thanks for providing a very detailed experience. Very well articulated.
    Car wash sector 18 noida

    ReplyDelete
  30. Summer is the perfect time for kids to have fun, make new friends, and explore new skills. MindzQ Summer Camp in Fair Lawnprovides an exciting opportunity for children to learn, grow and have fun in a safe and welcoming environment.

    ReplyDelete
  31. Are you looking for a personalized, effective, and convenient way to help your child succeed academically? MindzQ Education has got you covered! We offer online and offline K-12 tutoring in both one-on-one and group settings, led by our highly trained and experienced tutors.

    ReplyDelete
  32. Aaron Cooper, a seasoned Digital Marketer, masterfully blends creativity and strategy to create impactful online campaigns that drive results. With a keen eye for market trends and a passion for innovative marketing techniques, he navigates the digital landscape with finesse, helping businesses thrive in the ever-evolving digital world.

    Website : best HVAC service in the Toronto

    ReplyDelete
  33. cinesses need finance is to take advantage of growth opportunities. When the economy is doing well, businesses may have the chance to expand their operations, enter new markets, or acquire competitors. However, these opportunities require significant investment, and businesses that don’t have the funds to finance them may miss out. For instance, a technology company may have the opportunity to acquire a start-up that complements their product line, but they need to secure financing to make the purchase.In addition to these reasons, businesses may need finance to manage their cash flow effectively. Cash flow is the amount of money coming in and going out of the business, and it’s crucial to keep it positive. If a company’s cash flow is negative, it means they’re spending more than they’re earning, which can lead to financial problems. Access to finance can help businesses cover expenses during slow periods and prevent them from defaulting on payments.Finally, businesses need finance to meet legal and regulatory requirements. For example, companies may need to provide security deposits or meet certain financial thresholds to obtain permits, licenses, or certifications. These requirements can be costly, and businesses that don’t have access to finance may struggle to meet them.Overall, finance is essential for businesses to start, maintain, and grow their operations. Without it, businesses can’t cover their expenses, invest in growth opportunities, or manage unexpected costs. In today’s competitive market, having access to capital can make all the difference between success and failure.

    ReplyDelete
  34. Great blog! Sinoswan.com caught my attention with their platforms stage, stage hydraulic lift, and mobile billboard for sale. Their LED advertising truck for sale seems perfect for promoting events like church car shows. I'm also impressed by their top-quality music stage for sale and LED billboard truck options. Thanks for introducing me to such a versatile brand!

    ReplyDelete
  35. Micro-Service Architecture with Eureka involves building scalable applications. Eureka, a service registry, aids in dynamic service registration and discovery. Microservices are developed independently, promoting modularity and flexibility. Eureka ensures seamless communication among services, enabling efficient development, deployment, and maintenance of complex systems through a decentralized approach.
    Read More: Sportswear in Pakistan

    ReplyDelete
  36. Micro-Service Architecture (MSA) is a software design approach that decomposes applications into small, independent services, enhancing scalability and maintainability. Netflix's Eureka, a service registry, aids MSA by allowing services to locate and communicate with each other dynamically. Eureka simplifies load balancing, failover, and service discovery in distributed systems, facilitating seamless, resilient microservice interactions.
    Read More: Gaming Console Price in Pakistan

    ReplyDelete
  37. There are many Best IAS Institute In Delhi , and Tathastu - ICS is certainly among the best. We offer a unique blend of Degree Plus UPSC coaching, where you receive personalized guidance from people who have cleared the exam and will guide you. Get a comprehensive education, excel in UPSC, and earn a valuable degree.

    ReplyDelete
  38. Thank you for sharing useful information.The Competition in marketing is at a pace and Covalent Softwares is at your rescue being theBulk Whatsapp in Mumbai helping your business grow. Our firm is the top Bulk Whatsapp in Mumbai For more details, please visit our website.

    ReplyDelete
  39. Thank you for providing valuable information. We specialize in offering comprehensive Bulk SMS Solutions that empower businesses to easily connect with their customers. As a trusted Best Bulk SMS in Mumbai, we take pride in our prominent position within the industry. To discover more about the services we offer, kindly visit our website at Best Bulk SMS in Mumbai.

    ReplyDelete
  40. This comment has been removed by the author.

    ReplyDelete
  41. This is a very informative post! This blog really caught my attention. Thanks for sharing this article on Micro-service Architecture with Eureka. Keep up the great work and keep sharing your knowledge!
    Know more about alecensa 150 mg here.

    ReplyDelete
  42. Website development services in USA offer top-tier solutions for creating and enhancing online platforms. Expert developers design, code, and optimize websites to meet specific business needs, ensuring user-friendly interfaces and robust functionality. These services cater to diverse industries, from e-commerce to corporate websites, and prioritize responsive design, SEO, and security to deliver high-quality online experiences.

    ReplyDelete
  43. Make your birthday celebration even more special with our return gifts for birthday . These unique and exciting favors are sure to delight all the little guests and leave a lasting impression. That's why we are thrilled to offer you our exceptional selection of Return Favors, designed to add an extra touch of magic to your special day!

    ReplyDelete
  44. A digital journey with the best web development companies at your side. We blend creativity and technology to build websites that not only look stunning but also perform exceptionally. With our expertise, your online presence will shine, leaving a lasting impression on visitors. Transform your ideas into reality today.

    ReplyDelete
  45. Embrace the convenience of free classified ads in India. Experience a seamless way to buy, sell, or trade anything under the roof. From electronics to fashion, services to jobs, find it all in one place. Don't miss out on fantastic deals and opportunities. Your next treasure awaits just a click away.

    ReplyDelete
  46. This comment has been removed by the author.

    ReplyDelete
  47. Welcome to Seekware Global, your gateway to unparalleled digital marketing solutions in Ottawa! Our team of seasoned experts specializes in elevating brands, enhancing online visibility, and driving unprecedented growth in the digital landscape. With a focus on cutting-edge strategies tailored to your unique needs, we deploy innovative techniques across SEO, social media, content marketing, PPC, and more. Trust Seekware Global to navigate the complexities of the digital realm, propelling your brand to new heights in Ottawa and beyond. Join forces with us and unlock the full potential of your online presence today!

    ReplyDelete
  48. Keep doing this work it really helped me to understand new things and contains some in interesting topics also have a look at this Yoga Teacher Training Course in Rishikesh Thank you for this amazing post.

    ReplyDelete
  49. Thank you for this amazing post it really helped me a lot and contains some valuable stuff to read keep doing this work also have a look at this Yoga Teacher Training in Rishikesh India

    ReplyDelete
  50. What a wonderful blog it really help me to understand new things and contains some interesting topics keep doing this work also have a look at this 100 Hour Yoga Teacher Training in Rishikesh

    ReplyDelete
  51. Really helpful blog with awesome content and beautiful explanation.

    ReplyDelete
  52. Thanks for sharing this informative blog. Keep posting. Discover unparalleled healthcare at the Best Hospital in Delhi NCR. Boasting state-of-the-art facilities, renowned medical experts, and compassionate care, our institution sets the gold standard for excellence, ensuring comprehensive wellness and cutting-edge treatments for every patient's unique needs.

    ReplyDelete
  53. Very nice blog, thanks for sharing this valuable information. Yashoda Centre for Bone Marrow Transplant constitutes a part of Yashoda Hospital- one of India’s largest, private sector tertiary care hospitals. The Centre aims are to provide patients with incurable blood disorders the option of transplant as a possible cure.

    ReplyDelete
  54. The beauty of microservices architecture lies in its agility and resilience. Independent, loosely coupled services enable faster development, easier deployment, and improved fault tolerance. But, as with any powerful tool, there are also challenges

    ReplyDelete
  55. Active Detailing offers the best car detailing franchise in India, setting the standard for automotive care.

    ReplyDelete
  56. This is a very nice blog, thanks for sharing this useful information. With the advent of modern lifestyles and changes in dietary habits, heart attacks have become a very common condition these days. As per reports, in one hour, 1 out of every 4 individuals the world over gets a heart attack.

    ReplyDelete
  57. Micro-Service Architecture With Eureka offers a seamless and efficient solution for managing and scaling distributed systems. Eureka's service registry and discovery capabilities streamline communication between microservices, enhancing overall system reliability. With its user-friendly interface and robust features, it simplifies the complexities of microservices, making it a valuable tool for developers.

    ReplyDelete
  58. For once, the writing is decent and the material is really instructive. It's good to know that some individuals can still produce high-quality posts! Aman Gupta Net Worth.

    ReplyDelete
  59. This article's clever wording and well-informed material are really appreciated. I could not put this stuff down once I became engrossed in reading it. I'm in awe of your skill and effort. I'm very grateful. Aman Gupta Net Worth.

    ReplyDelete
  60. Thanks for your informative content. I Proud of you Its help our lifestyle. Anyway, If you want to access any website with VPN. So lets go!

    ReplyDelete
  61. Hey, Your blog is very informative. It is nice to read such high-quality content. If you want to Clear Cache on your browser so visit our website.

    ReplyDelete
  62. Party Bus New York offer an exhilarating way to celebrate special occasions while exploring the vibrant cityscape. These spacious and luxurious vehicles are equipped with all the amenities needed to turn any event into an unforgettable experience. From bachelor and bachelorette parties to birthdays, proms, and corporate outings, party buses in New York provide a unique and exciting way to travel in style while enjoying the company of friends and family.

    ReplyDelete
  63. Phone Repair Davie offers comprehensive solutions for individuals facing issues with their mobile devices in the Davie area. With a team of skilled technicians and a commitment to quality service, Phone Repair Davie specializes in diagnosing and repairing a wide range of problems, including cracked screens, water damage, battery issues, and more. Conveniently located in Davie, Florida, the repair shop provides a convenient option for local residents and businesses in need of fast and reliable phone repairs.

    ReplyDelete
  64. Professional Urdu translation services providing accurate and culturally sensitive translations for businesses, organizations, and individuals. Our expert Urdu translators ensure clear communication and seamless localization for all your documents, websites, and content.

    ReplyDelete