Service Discovery and Microservices Tutorial

Ғылым және технология

Service Discovery. What is Service Discovery? In this series I will teach you how to build microservices with spring boot, spring cloud, docker and Kubernetes. In this video you will learn how to use service discovery
Microservices - also known as the microservice architecture - is an architectural style that structures an application as a collection of services that are
- Highly maintainable and testable
- Loosely coupled
- Independently deployable
- Organized around business capabilities
- Owned by a small team
The microservice architecture enables the rapid, frequent and reliable delivery of large, complex applications. It also enables an organisation to evolve its technology stack.
#servicediscovery #microservices #amigoscode
COURSE AVAILABLE: amigoscode.com/p/microservices
Links
Repo - github.com/amigoscode/microse...
Spring.io - spring.io/
Getting Started with Maven - maven.apache.org/guides/getti...
Docker - amigoscode.com/p/docker-devops
More Courses - amigoscode.com/courses
Don't Forget to
===========================================
💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
💯 Courses Available for free here - amigoscode.com/courses
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
⭐ Table Of Contents ⭐
===========================================
00:00 - Intro
01:15 - What is Service Discovery
05:31 - Spring Cloud Dependency
09:15 - Setting Eureka Server
15:00 - Eureka Dashboard
17:01 - Eureka Clients
24:48 - Load Balance Requests
31:47 - Outro
🙊 Here are the goods for all my videos video 🙊
► Recommended Books
===========================================
- Clean Code - amzn.to/2UGDPlX
- HTTP: The Definitive Guide - amzn.to/2JDVi8s
- Clean Architecture - amzn.to/2xOBNXW
► Computer and Monitor
===========================================
- New Apple MacBook Pro - amzn.to/3464Mmn
- Dell 27 INCH Ultrasharp U2719D Monitor - amzn.to/2xM3nW1
- Double Arm Stand Desk Mount - amzn.to/3aYKKfs
- USB C Hub Multiport Adapter - amzn.to/2Jz7NlL
► Camera Gear
=============================================
- Sony ILCE7M3B Full Frame Mirrorless Camera - amzn.to/346QIJn
- Sigma 16 mm F1.4 DC DN - amzn.to/2wbic3Q
- Sigma 33B965 30 mm F1.4 DC DC - amzn.to/39G37Fd
► IDE & Tools I use for coding 💻 🎒
===========================================
- ITerm
- VsCode
- GoLand
- IntelliJ Ultimate
- Sublime
P.S
===========================================
💯 Don't forget to subscribe | bit.ly/2HpF5V8
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
💯 Follow me on Instagram | bit.ly/2TSkA9w
❤️ Thanks for watching

Пікірлер: 123

  • @dhananjaychumbalkar6052
    @dhananjaychumbalkar60522 жыл бұрын

    Thank you so much for creating such amazing courses. I have been following up all your courses one by one and learning a lot of new things from each and every video.

  • @seopyo-dj7ks
    @seopyo-dj7ks Жыл бұрын

    thank you. I didn't understand it, so I looked for it for a while, but after watching the video, I understood it right away. Your lectures are very nice. you are my benefactor

  • @kirillbelko6422
    @kirillbelko6422 Жыл бұрын

    Thanks for such a useful and clear lesson! I didn't imagine that spring cloud allows us to organise microservises communication so easily

  • @zakhelendaba6970
    @zakhelendaba6970 Жыл бұрын

    Wow... I knew nothing about service discovery but after your course... all i can say is WOW!! Thanks bro

  • @fredericochopin
    @fredericochopin2 жыл бұрын

    Another great addition to the Microservices series! Keep up, Nelson!

  • @cagatayyilmaz7096
    @cagatayyilmaz70962 жыл бұрын

    You are a really good teacher. I appreciate your help. I hope you will continue these videos and light up developers like me.

  • @leonardoamorimramos5656
    @leonardoamorimramos56562 жыл бұрын

    Great video Nelson. I'm following all your videos and learning so many thing. Congrats for your amazing work. Muito obrigado amigo!

  • @vireaksstorm5994
    @vireaksstorm5994 Жыл бұрын

    I also really appreciate for your help created this course. I hope your gods will bring you with luck and healthy. Thank you so much.

  • @infiniteloop71
    @infiniteloop71 Жыл бұрын

    Thanks for this tutorial. Literally saving my life with this one!

  • @maximilian_gl
    @maximilian_gl2 жыл бұрын

    Great video, as always :) Would love to see video about securing all those microservices!

  • @javohiruralov1812
    @javohiruralov18122 жыл бұрын

    Thank you Nelson so much for the course. Keep it up. Your content is so good that everything is explained very vell. 😊

  • @ingabirejeanherve2733
    @ingabirejeanherve2733 Жыл бұрын

    Let me thank you for this awesome course boss... Stay blessed man

  • @lil_paha
    @lil_paha2 жыл бұрын

    Thank you for this video Please keep going with this series :)

  • @gabrielpadilh4
    @gabrielpadilh42 жыл бұрын

    Amazing course, great! Thank you for this content!

  • @sheharajayashan7498
    @sheharajayashan74982 жыл бұрын

    Thank you very much for all your amazing videos.

  • @dases4335
    @dases43352 жыл бұрын

    Salem, baraka allah fik, Great content, I have learned a lot from this serie Please keep going and thanks again.

  • @MZ-dg3er
    @MZ-dg3er10 ай бұрын

    Salam alikom from Morocco thank you very much. Allah yjazik bekhayr

  • @pablocaiza.
    @pablocaiza.2 жыл бұрын

    awesome , the best way to start the week

  • @ApolloSaifullin
    @ApolloSaifullin Жыл бұрын

    Thanks a lot! You're a Great Lecturer!

  • @briankipkurui6581
    @briankipkurui65812 жыл бұрын

    Useful content always , thanks alot amigos we grow alot from your content

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @timorthymasanyinga9350
    @timorthymasanyinga93502 жыл бұрын

    am always following your videos hey they are really amazing.

  • @teferiheye9834
    @teferiheye98342 жыл бұрын

    Amazing course, great!!Thank you.

  • @yunmyeonghun
    @yunmyeonghun2 жыл бұрын

    What amazing course, Thanks~

  • @Chauhannitin
    @Chauhannitin2 жыл бұрын

    When you got error when using service name, there was only single instance. In order to clarify, you had created one more instance. Why the exception when only one instance of service is there.

  • @mateusfernando5847
    @mateusfernando5847 Жыл бұрын

    Very well explained, thanks!

  • @Iliaspap80
    @Iliaspap802 жыл бұрын

    Awesome course, I already bought it and I highly recommend it! I would appreciate a section on how to secure (authentication/authorization) all these microservices, how to prevent unauthorized access in some of microservices and how to implement a Bearer token in microservices environment.

  • @CaptainStache

    @CaptainStache

    2 жыл бұрын

    Spring Security does this job that you want my friend. You can create a JWT token with spring security and pass it as a header into the request. Some services don't need bearer token (like user registration.) The most common primary service that uses bearer token is login because the token is gonna be created after the user registration!

  • @krisorsmso5094

    @krisorsmso5094

    2 жыл бұрын

    Amigos has a great tutorial on spring security as well.

  • @adancastroharos9408
    @adancastroharos94082 жыл бұрын

    Excellent work, thank you very much

  • @davebudah
    @davebudah2 жыл бұрын

    Would love to rock in an AMIGOS CODE t-shirt. Thanks for the awesome tutorial.

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @Mac1355
    @Mac13552 жыл бұрын

    tks for new amazing video and your share

  • @user-ji6nk8fo8r
    @user-ji6nk8fo8r Жыл бұрын

    Very clear! Thank you, keep going)

  • @WolfBoy2700
    @WolfBoy27002 жыл бұрын

    That was ace, thank you.

  • @okvak3274
    @okvak32742 жыл бұрын

    Thank you for your help 😊

  • @halcyon-s
    @halcyon-s9 ай бұрын

    Thanks for tutorial!

  • @p.ternali
    @p.ternali2 жыл бұрын

    perfect explanations!

  • @yangsopiana5654
    @yangsopiana56542 жыл бұрын

    Amazing content.. thank you for this video

  • @abdelrhmanadel2832
    @abdelrhmanadel2832 Жыл бұрын

    thank you very much you are amazing man

  • @mostafaaguerram
    @mostafaaguerram2 жыл бұрын

    Thanks to you I switched from Nest js after 2 years of using it, to spring boot, and no regrets I'm enjoying Spring boot. Great content, great videos.

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @bfcodinghub
    @bfcodinghub2 жыл бұрын

    thanx Nelson for the content

  • @airmode5545
    @airmode55452 жыл бұрын

    great course thanks :D

  • @gustavochavarroortiz2443
    @gustavochavarroortiz2443 Жыл бұрын

    So So So good tutorial, man you are awesome

  • @ChandlerBing11
    @ChandlerBing112 жыл бұрын

    A truly amigo. Thank you so much, Mama Samba

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance on investment

  • @bigggjimmm
    @bigggjimmm2 жыл бұрын

    Be Blessed Man!

  • @anastasianaumko923
    @anastasianaumko923 Жыл бұрын

    Thank you!

  • @wwhill8033
    @wwhill80332 жыл бұрын

    👏👏👏well done Amigo

  • @OmerFarukAY-ij2xg
    @OmerFarukAY-ij2xg11 күн бұрын

    thank you very much

  • @zhongzhicheah960
    @zhongzhicheah9602 жыл бұрын

    In a cloud environment (Azure), would you recommend deploying our services on top of Azure Kubernetes Service or Azure Spring Cloud?? Given that they both provide similar functions like service discovery, centralized config?

  • @darpanshirsat5122
    @darpanshirsat51222 жыл бұрын

    Thanks Amigo!

  • @khalilbouali3480
    @khalilbouali34808 ай бұрын

    awesome !

  • @rick-kv1gl
    @rick-kv1gl2 жыл бұрын

    man, ur so pro.

  • @biglaray
    @biglaray6 ай бұрын

    Thanks!!

  • @tahagharaibeh9367
    @tahagharaibeh93672 жыл бұрын

    شكرا يا حب ♥

  • @chandragie
    @chandragie2 жыл бұрын

    God this is GEM!!!

  • @seiko777
    @seiko777 Жыл бұрын

    Great content and teacher! One question: on Postgres pgAdmin4 i see that sequences are all made with INCREMENT 50 instead of default INCREMENT 1. Is that a way to set this parameter on app?

  • @youssoufcameroon2565
    @youssoufcameroon25652 жыл бұрын

    Thanks a lot brother

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @ogunodabas9332
    @ogunodabas93322 жыл бұрын

    Can you explain the comparison of eureka vs zookeeper vs consul with simple examples?

  • @kenjihikmatullah1060
    @kenjihikmatullah10603 ай бұрын

    Syukran, Nelson

  • @AshishMishra-kw2zm
    @AshishMishra-kw2zm2 жыл бұрын

    Amazing Content ...

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance on investment

  • @hojiakbarmadaminov2462
    @hojiakbarmadaminov2462 Жыл бұрын

    Thanks bro

  • @dr.usayma1870
    @dr.usayma18702 жыл бұрын

    THANKS VERY MACH

  • @username1780
    @username17802 жыл бұрын

    useful content

  • @ax8635
    @ax86352 жыл бұрын

    As-salamu alaykum from Greece!

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @gustavogoncalves2101
    @gustavogoncalves21012 жыл бұрын

    The BEST!!!

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 ❤️ For consultation and assistance

  • @Mr.indian.justice.555
    @Mr.indian.justice.5552 жыл бұрын

    Please create one video on spring boot with Jooq and postgresql. Thanks!

  • @omarakki705
    @omarakki7052 жыл бұрын

    Thanks brother

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For mentorship and assistance on investment

  • @MadinabonuO
    @MadinabonuO2 жыл бұрын

    Assalamu alaikum bro. Thank you for an awesome content.😊

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @sumedhtayade821
    @sumedhtayade8212 жыл бұрын

    May Allah Taala bless you sir

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance on investment

  • @moisesnunez6915
    @moisesnunez69152 жыл бұрын

    Looked up how Spotify went down last month , it had to do something with service discovery, then this video came up on my feed. What a Coincidence

  • @erikmargaryan7119
    @erikmargaryan7119 Жыл бұрын

    Hey, I've a question. For first time fraud had just one instance, why we got server error?

  • @MultiSaitox
    @MultiSaitox2 жыл бұрын

    Asalam alaykoum Amigos, so much great content, thank you ! Is it possible to make a video about making software engineering youtube video tutorials, your pipeline, your setups... ? It would help newcomers to also begin making high quality videos as your's. Baraka allah fik

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @manho9682
    @manho96829 ай бұрын

    thanks you, please explain to me, why status in application session on eureka dashbord of me is host.docker.internal instead of ip address like you?

  • @frapder
    @frapder2 жыл бұрын

    Thanks for the amazing content! Just a question: what’s the purpose of service discovery? What is the common use cases in which we could consider to use it? Thanks again!

  • @CaptainStache

    @CaptainStache

    2 жыл бұрын

    Service Discovery is actually the mechanism that allows you to register every single (micro)service in it. It is based on the election leader and service registry algorithm. The purpose of service discovery is to check the available instances that have been created and registered to the service registry. We care about that because microservices is a distributed system. Every single instance of microservice is actually a worker into the distributed system and every worker has a purpose to fulfill. If an instance has bad health and it cannot handle the requests, the service discovery here kicks in and it is responsible to create a copy/duplicate of the current microservice (worker) before it is going to terminate because of its bad health. When the new instance of microservice is going to be available then it going to be registered into the service registry and it goes on.

  • @frapder

    @frapder

    2 жыл бұрын

    @@CaptainStache Thanks for the detailed explanation!

  • @krisorsmso5094

    @krisorsmso5094

    2 жыл бұрын

    @@frapder This mechanism also allows horizontal scaling - when you get more traffic going another instance could be booted up instantly without the interuption of the actual application. There's basically some application state observers in place - which define how many instances should be up and running minimum. In Kubernetes it's called the watch loop. When you're dealing with monolithic application you would need to provide a single more powerful machine (vertical). This solution can only work for certain amount of workload. And also has a single point of failure.

  • @zhongzhicheah960
    @zhongzhicheah9602 жыл бұрын

    Does it works with WebClient given that RestTemplate is depreciated?

  • @carlosh9732
    @carlosh97322 жыл бұрын

    Can anyone help me ? with some doubts I have, but first great video then this project is based on multi module tier and docker compose how do you handle partial update(just one microservice but without taking down the other services) via CI/CD (in my case I use github actions) the idea is mmm like one repository multiple services but when need it just update the one updated....

  • @saeidkazemi8480
    @saeidkazemi84802 жыл бұрын

    Hi , thanks for the awesome explanation, the question is are there another options instead rest template to work and using load balancing to communicate?

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @CaptainStache

    @CaptainStache

    2 жыл бұрын

    load balancing is the mechanism that gives us the ability to manage the network traffic/requests and spread them to every available microservices that is registered into the service discovery. API gateway (Zuul) can do this work or Ribbon Load Balancer in this case. Load Balancer has many algorithms that distributes the traffic in correct sequence to each microservice but the most common is round Robbin. Now for the communication between microservices there are some categories: External communication using clients such a rest Template or Feign Client to CONSUME an external microservice. Internal Communication using Message Brokers (Rabbitmq, redis, Kafka) or with the use of gRPC. P.S I edited my comment

  • @krisorsmso5094

    @krisorsmso5094

    2 жыл бұрын

    asynchronous communication would also work - An application publishes an event within Rabbit MQ. And the other instances are constantly monitoring the event table for published events to be dealt with.. This however might not be sufficent for all the use-cases - for instance GET requests need instant feedback.

  • @GiuseppeScrugli
    @GiuseppeScrugli Жыл бұрын

    I faced a problem: anytime a fraud instance is added/removed from eureka-server the customer instance must be rebooted for loadbalancer to be updated.

  • @atalibcodinglevel7518
    @atalibcodinglevel75182 жыл бұрын

    Manshallah Manshallah ❣

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @atalibcodinglevel7518

    @atalibcodinglevel7518

    2 жыл бұрын

    The WhatsApp is not showing

  • @kamerkamerlok2105
    @kamerkamerlok2105 Жыл бұрын

    Oki Doki😀

  • @nesreenmohd665
    @nesreenmohd6652 жыл бұрын

    Asalam alaykoum, thank you for your great videos. I am wondering if you can tell us the options that microservices can talk to each other beside Rest template and which one is popular and beter?

  • @lukmanmudi5742

    @lukmanmudi5742

    2 жыл бұрын

    Let me share this (in case you don't get a better reply). I know 3 ways you can make service to service communication. 1. Using Rest template (obviously) 2. Using HttpClient along with (HttpRequest and HttpResponse) added in Java 9. 3. Using MicroProfile Rest Client Rest template is popular in Spring framework (IMO) HttpClient API is mostly common in desktop applications (IMO) MicroProfile Rest Client is popular in the Java EE (now Jakarta EE) ecosystem(IMO)

  • @nesreenmohd665

    @nesreenmohd665

    2 жыл бұрын

    @@lukmanmudi5742 Thank you for your reply. So if I have a web based application, which on is the best to study it and practice it?

  • @CaptainStache

    @CaptainStache

    2 жыл бұрын

    1. Rest Template (Synchronous) ot Feign Client (Asynchronous) clients are for communication with EXTERNAL microservices in real case scenario. 2. The most common way to communicate with internal microservices is using a message broker (rabbitmq, redis, Kafka) Kafka is the most powerful one. You need pub/sub pattern to achieve that etc 3. Now one more advanced method to communicate with each microservice is gRPC.

  • @sujithaveeramani4497
    @sujithaveeramani44972 жыл бұрын

    Hello Nelson, I wanted to purchase this full course. Any promotion or coupon code?

  • @saeidkazemi8480
    @saeidkazemi84802 жыл бұрын

    Can We use feign client? To do IPC and does it have load balancing?

  • @amigoscode

    @amigoscode

    2 жыл бұрын

    In the full course I show how to use feign

  • @vidhangoyal373
    @vidhangoyal3732 жыл бұрын

    Hii , I am a novice in spring boot applications and I love your videos . For this video I understood almost everything except one part as to how did the RestTemplate class got updated when we put @LoadBalanced annotation in the CustomerConfig class as we just made a normal method there that just returns a new RestTemplate Object so what's that got to do with the whole RestTemplate class .. I needed help with this question..!!!??

  • @TheEntium

    @TheEntium

    2 жыл бұрын

    Because the method which we annotate as a @Loadbalanced is also a bean (because of @bean annotation) now spring will handle all the object creation when this method gets called anywhere which returns a new RestTemplate .. and this RestTemplate is injected during our rest call. Once we add @Loadbalanced annotation to the RestTemplate bean load balancing mechanism will apply on it.. So now wherever this bean (RestTemplate) called loadbalancing will automatically happen

  • @vidhangoyal373

    @vidhangoyal373

    2 жыл бұрын

    @@TheEntium thanks for the explanation, I got it now 👍

  • @diggydavro1588
    @diggydavro15882 жыл бұрын

    🤩🤩🤩🤩

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and mentoring

  • @user-br2jc5oo4o
    @user-br2jc5oo4o3 ай бұрын

    good good good

  • @hananasyrawi5206
    @hananasyrawi52062 жыл бұрын

    Walaikum Salam

  • @derrickagyemang1259
    @derrickagyemang12592 жыл бұрын

    Hello Amigos, great content. I tried to replicate a service like you did and change the URL to the registered name of the service like you did at time 25:30 going, but haven't been successful, checked the git repo but the implementation wasn't present. Thanks again and please assist with what i pointed out

  • @konradmaocha6397

    @konradmaocha6397

    2 жыл бұрын

    Yoyo, have u tried to add @LoadBalanced annotation above RestTemplate bean creation method? Check this out: github.com/amigoscode/microservices/commit/f380637d80b3ff5990d3465a50da4ab35e0684d7#diff-dc459c235a779d88b39fb0e7b5b9ab694c0b25450fb0ca2be2c0eb748f866a26

  • @diegobladi
    @diegobladi2 жыл бұрын

    En español Amigoscode pero hablas en ingles wooo

  • @kashifsaeed1972
    @kashifsaeed19722 жыл бұрын

    sir can you give subtitle in urdu

  • @whatsappadmin2206

    @whatsappadmin2206

    2 жыл бұрын

    👆 For consultation and assistance

  • @toannguyenthe5422
    @toannguyenthe5422 Жыл бұрын

    Hi Amigos. Your skill is so excited but can you sell this course in the udemy ?

  • @jsdevtom
    @jsdevtom2 жыл бұрын

    You means... DNS...

  • @napeHEK1
    @napeHEK12 жыл бұрын

    You have the best content. Please explain two things. 1)I didn't understand why it doesn't send requests without @LoadBalanced (in the case of one service in Eureka). Does @EnableEurekaClient not allow you to do it? 2) Unexpectedly, @LoadBalanced is put on @Bean RestTemplate. How does he know that RestTemplate is able to send requests?

Келесі