Client side Load Balancer using Spring Cloud Ribbon | Spring Boot

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 มิ.ย. 2018
  • This video explain you what is load balancing and how to perform load balancing using spring cloud ribbon
    GitHub:
    github.com/Java-Techie-jt/spr...
    Blogs:
    javagyanmantra.wixsite.com/we...
    Facebook Group :
    / 919464521471923
    Like & Subscribe
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 108

  • @palashkhatri7820
    @palashkhatri7820 4 ปีที่แล้ว +1

    Beautifully Explained ! Thanks a ton @Java Techie

  • @thirue8237
    @thirue8237 3 ปีที่แล้ว +3

    Excellent explanation ,Appreciate your patience!!

  • @MURALISAI
    @MURALISAI 4 ปีที่แล้ว +2

    Nice, detailed explanation! Thank you, Sir.

  • @rivnos9431
    @rivnos9431 2 ปีที่แล้ว +2

    I have seen most of video of microservices and the way you explain is quite easy to understand and it added more flavour by doing in practical.. Awesome.. 👍👍👌👌

  • @Mohamed-uf5jh
    @Mohamed-uf5jh 4 ปีที่แล้ว +1

    Very nicely explained. Thank you very much,good job !

  • @sekhar14301
    @sekhar14301 ปีที่แล้ว +1

    I saw multiple videos form others.. every one explained with PPT or diagrammatic. Not understand much... #When I watched this video 💯 got calrity on loadbaching... thanks for sharing with us ❤

  • @TechieTaught
    @TechieTaught 3 ปีที่แล้ว +1

    appreciate the approach to explain such beautiful concept. Awesome

  • @samarthurs8000
    @samarthurs8000 4 ปีที่แล้ว +2

    Very nicely explained. Thank you very much. This video deserves much more Views and Likes. Keep up the good work!

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Thanks Samarth 😁 , glad to hear this from you 👍

  • @ercreddy
    @ercreddy 4 ปีที่แล้ว

    Excellent explanation, Thank you !!

  • @santhoshg8528
    @santhoshg8528 4 ปีที่แล้ว +1

    the best explanation i ever i had. kudos to java techie

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Thanks santosh 🥰

  • @viveksagar33333
    @viveksagar33333 3 ปีที่แล้ว +1

    Sir, you deserve more subscribers.. Thanks for the tutorial

  • @akashroy1618
    @akashroy1618 2 ปีที่แล้ว +1

    awesome,
    keep that coming.

  • @amitpatil746
    @amitpatil746 4 ปีที่แล้ว +1

    Very nice explanation. It was very helpful. Keep this nice work going.

  • @kartheekpatnaik8644
    @kartheekpatnaik8644 2 ปีที่แล้ว +1

    Crispy bro

  • @Life-GiftOfGod
    @Life-GiftOfGod ปีที่แล้ว +2

    tooooooo good :) thanks a lot!!!

  • @errajesh29
    @errajesh29 5 ปีที่แล้ว +1

    very good , in sort explained big concept.

  • @vivek1857
    @vivek1857 4 ปีที่แล้ว +1

    Very nice Video mate!!

  • @AhmedKhaled-he9mf
    @AhmedKhaled-he9mf 2 ปีที่แล้ว +1

    Thanks very very much for very nice work from explain and source code.
    Thanks very much

  • @bullsbearsfight
    @bullsbearsfight 2 ปีที่แล้ว +1

    in all your tutorial this was best :)

  • @vitaliibrezhnev6245
    @vitaliibrezhnev6245 ปีที่แล้ว +1

    thank you, i understand all what i need

  • @sagar1689
    @sagar1689 2 ปีที่แล้ว +1

    Very nice explanation.. thanks

  • @souravsantra4731
    @souravsantra4731 3 ปีที่แล้ว +1

    Very good content. Thanks

  • @democratcobra
    @democratcobra ปีที่แล้ว +1

    greate job bro !!

  • @pitchibovilla3998
    @pitchibovilla3998 5 ปีที่แล้ว +1

    Nice explanation

  • @ankitjain9958
    @ankitjain9958 3 ปีที่แล้ว +2

    I appreciate all your efforts ..thank you man 👍
    On fun note your voice similar to bjp spoke person shahnawaz hussain

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      👍🏻👍🏻👍🏻😂😂

  • @aakashkumbhare4399
    @aakashkumbhare4399 3 ปีที่แล้ว +1

    👍 Great

  • @Dyslexic_Neuron
    @Dyslexic_Neuron 5 ปีที่แล้ว +1

    Nice vdo man !! Keep up the good work
    Plz make a video on hysterix !

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Thanks Deep , hey already I uploaded video related hystrix please Go through below link
      th-cam.com/video/2x9G8daUM8A/w-d-xo.html
      th-cam.com/video/A2IhEwbniLI/w-d-xo.html

  • @popatpopatpopat123
    @popatpopatpopat123 4 ปีที่แล้ว

    What’s the difference between eureka service discovery vs Ribbon discovery? which one should be used in production env?

  • @kidsfun381
    @kidsfun381 3 ปีที่แล้ว +1

    nice

  • @amitgarg8937
    @amitgarg8937 2 ปีที่แล้ว +1

    Hi @Java Techie, I just tried this implementation and it worked after remove ribbonRule() method from configuration otherwise gave error no chatbook instances are running.

  • @jyotsanarai6715
    @jyotsanarai6715 2 ปีที่แล้ว

    What if i dont specify the ports of instances using server.port: 0 and let spring decide the port no for me ?

  • @subinsajin
    @subinsajin 5 ปีที่แล้ว +5

    Thank you so much for the informative video!!!
    In the last part of the video, you mentioned if we use eureka we can do load balancing by adding @LoadBalanced to restTemplate method, without using RibbonConfiguration. So why do we really need Spring Cloud Ribbon, if we can just do with Eureka?

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว +5

      Hi Subin, if you are directly using eureka then ribbon implementation is inbuilt in nature all required configuration stuff already preconfigured in eureka

    • @rexsam3134
      @rexsam3134 2 ปีที่แล้ว

      @@Javatechie then why did you set Eureka enabled to false in yml file?

    • @vikrantmanekar4817
      @vikrantmanekar4817 2 ปีที่แล้ว

      @@rexsam3134 I am also having same question

  • @ashwinkumar504
    @ashwinkumar504 4 ปีที่แล้ว +1

    Nice job , thanks and keep it up .............
    You have suggested some changes like "template.getForObject("chatbook/chat" , String.class);" ......
    Some guy online suggested remove @Bean annotation for IRule in config so i did and it worked .... of course dont know why :-)
    RibbonConfiguration.java
    .........
    // @Bean
    -------------->Remove annotation
    public IRule rule(IClientConfig iClientConfig){
    return new AvailabilityFilteringRule();
    }
    .........
    Hope it helps ....

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว +1

      In one of the comment I shared alternative solution please have a look

  • @prometheusli101
    @prometheusli101 3 ปีที่แล้ว +1

    why we need to do this?in this case,i think we may had twice request,first request to ribbon-server,second request is that ribbon-server to final-sever ,and then,final-sever response to ribbon-server,ribbon-sever response to client?is this slow down the web request speed?twice request ,double traffic?i was confused and i thought this is not make sense

  • @puranpush
    @puranpush 2 ปีที่แล้ว

    Suppose if I have many apis like /chat in loadbalancer app.. Then how many /invoke api needs to write in client app?

  • @RanjithKumar-dg1qw
    @RanjithKumar-dg1qw 3 ปีที่แล้ว +1

    Hi Sir, I was getting "No instance found for chatapp" error. Eventually, I had to remove ribbonRule method from RibbonConfiguration class for it to work. Not sure why.

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว +1

      Not sure based on current version there may be syntactical changes

  • @steavejacks6788
    @steavejacks6788 3 ปีที่แล้ว +1

    Regarding IPing and IRule Beans:
    you passed an argument IClientConfig which you did not use within Bean method.
    so is it necessary to pass it? please help me understand I'm new to Spring Boot
    BTW your videos are extremely helpful. Thank you so much.

  • @noorahameds8
    @noorahameds8 ปีที่แล้ว

    I have created two spring boot projects employee and department and both this entities are registered on Eureka server and I have configured an Api gateway to call this entity so to add load balancer to this project I need to apply load balancing only on API gateway or all three projects (api gateway, employee, department). I want to use Netflix Ribbon for load balancing.
    ANY INPUT WOULD BE VERY HELPFUL.
    Thanks in advance

  • @muralijava552
    @muralijava552 หลายเดือนก่อน

    Hi Basant,
    I am not able to run these examples in new version of STS4 please share the old STS4 link if you have

  • @valorant563
    @valorant563 ปีที่แล้ว +1

    Can't find the ribbon dependency to add. Should I change the java version or spring version.

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Change spring version

  • @chaitaligaikar621
    @chaitaligaikar621 3 ปีที่แล้ว +1

    The concept of load balancing is very well explained in the video. Can you suggest how to implement the same for POST, DELETE. Also in real time application there can be n number of end points so how to handle those?

    • @puranpush
      @puranpush 2 ปีที่แล้ว

      Ya pls answer for this @java techie.. I too have the same question

  • @jewelchowdhury9752
    @jewelchowdhury9752 3 ปีที่แล้ว

    First of all, thank you very much, sir. I have a question. I want to build a micro-service based e-commerce web application. suppose, I have some services, like customer service, product service(only contain Title and description and the image & price fetches IMG & price from another IMG service & price service), order service, and cart service. In my product service, It is possible when I have static data. and I have tried it. But my question is how can I add a new product record (with all fields) from the admin service(admin panel) into the multiple services like IMG service, product service(Title and description), price service? Please make a video on how to add records into multiple services at a time?

  • @abhishekbalawan6817
    @abhishekbalawan6817 ปีที่แล้ว

    Ribbon is not available now. Can you suggest some other way @javatechie?

  • @ashishmishra2346
    @ashishmishra2346 3 ปีที่แล้ว

    How to do load balancing in Eureka 3 node Cluster and client should connect with Load Balancer

  • @rexsam3134
    @rexsam3134 3 ปีที่แล้ว

    Why am I getting No instances available for CloudRibbonLB where CloudRibbonLB=chatbook. Spring Boot 2.3.4.
    Individual ones are deloyed on the 3 ports and I can see the message on the screen
    Same happened while running Eureka client after registering on Eureka server.

  • @anilkumarsharma6689
    @anilkumarsharma6689 ปีที่แล้ว

    Hello sir , can you make a completed video how to deploy micro-service on production server

  • @venuvamsi5344
    @venuvamsi5344 4 ปีที่แล้ว +1

    15:28..iclientconfig ribbonclient annotated as autowired,where this bean coming from?? Or we declared that class in our project

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      We added Netflix dependency right , that's where this bean available

  • @sundarivaddiparti8463
    @sundarivaddiparti8463 3 ปีที่แล้ว +1

    getting error saying "local instance not found for the list of servers". finally after commenting the below code in RibbonConfiguration it worked fine.
    @Bean
    public IRule ribbonRule(IClientConfig config) {
    return new AvailabilityFilteringRule();
    }
    Anything wrong in using IRule?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Which version of spring boot are you using ?

    • @sundarivaddiparti8463
      @sundarivaddiparti8463 3 ปีที่แล้ว +1

      @@Javatechie 2.3.3.

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      Am not sure then as I already mentioned based on enhance version the implementation might changes

  • @aakashkumbhare4399
    @aakashkumbhare4399 3 ปีที่แล้ว +1

    How should I test for 1000 multiple requests parallel?

    • @Javatechie
      @Javatechie  3 ปีที่แล้ว

      You can do that load test using soap ui

  • @muralijava552
    @muralijava552 หลายเดือนก่อน

    If possible please share the example of spring boot hashicorp

  • @realtimevideos1660
    @realtimevideos1660 3 ปีที่แล้ว +2

    i tried by removing "configuration" :
    @RibbonClient(name="chatapp") only. its works fine for me and i am also not getting error after this : java.lang.illegalstateexception: no instances available for chatbook .
    Do we really need this 'RibbonConfiguration' class????

    • @zeezinc7
      @zeezinc7 4 หลายเดือนก่อน +1

      same with me, removed and its working now.

    • @Javatechie
      @Javatechie  4 หลายเดือนก่อน +1

      This is too old video guys you are referring

    • @zeezinc7
      @zeezinc7 4 หลายเดือนก่อน

      @@Javatechie yes, do you have a newer version for this
      would like to refer that

  • @rakeshroshan9690
    @rakeshroshan9690 3 ปีที่แล้ว +1

    I downloaded this project and try to run, i am getting ""No instances available for chatbook", any reason ?

    • @rakeshroshan9690
      @rakeshroshan9690 3 ปีที่แล้ว

      i got , removed pingUrl from RibbonConfiguration, now working fine.

    • @soumyabasak8929
      @soumyabasak8929 3 ปีที่แล้ว

      this comment helped me a lot thanks man

    • @realtimevideos1660
      @realtimevideos1660 3 ปีที่แล้ว

      @@rakeshroshan9690 yes, but why??if anyone explain this. Thanks

  • @hemantanahak5674
    @hemantanahak5674 2 ปีที่แล้ว +1

    PLease share us the updated video, for client side load balancing example

    • @Javatechie
      @Javatechie  2 ปีที่แล้ว +1

      Okay will do once more

  • @dipakgiri3248
    @dipakgiri3248 4 ปีที่แล้ว +1

    If I use zuul api getway then ribbon is required?

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว +1

      Yes both have different purpose to use
      Zuul : request routing
      Ribbon : load balancing

    • @dipakgiri3248
      @dipakgiri3248 4 ปีที่แล้ว

      have your what's app

    • @dipakgiri3248
      @dipakgiri3248 4 ปีที่แล้ว +1

      but google is said zuul automatically use ribbon for load balancing

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      @@dipakgiri3248 am not sure I will check and let you know

  • @amargupta1728
    @amargupta1728 4 ปีที่แล้ว +1

    Hi Thank and nice video but when I tried to run it, I getting exception as java.lang.IllegalStateException: No instances available for testMicro so please suggest and if you need I can send you my code through mail to check the same.

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      Please share your code through GitHub

    • @amargupta1728
      @amargupta1728 4 ปีที่แล้ว

      @@Javatechie github.com/amargJava/client-side-load-banalcer-using-soring-boot
      Please check

    • @amargupta1728
      @amargupta1728 4 ปีที่แล้ว

      Hi, Hope you are fine now and please update.

    • @amargupta1728
      @amargupta1728 4 ปีที่แล้ว

      Please update and still waiting

  • @manideepkumar959
    @manideepkumar959 2 ปีที่แล้ว

    Whats the use of iping ,iclient ur not calling na

  • @quadirumar5532
    @quadirumar5532 5 ปีที่แล้ว

    I downloaded your code from github and tried to run
    but i am not getting the required output , i am getting following
    {
    "timestamp": "2019-06-13T16:14:04.413+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "No instances available for chatbook",
    "path": "/invoke"
    }

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Please read my previous comment I already replied to someone with solution.if you are not getting the. Do let me know

    • @Javatechie
      @Javatechie  5 ปีที่แล้ว

      Hi Umar,
      please remove root url from ChatbookApplication which i wrote on top of class i wrote @RequestMapping("/chatbook-application") and remove the same URL while invoke from user-app controller and use like this template.getForObject("chatbook/chat" , String.class); don't know why it behaving like this now , what i understood previously we wrote like template.getForObject("chatbook-application-chatbook/chat" , String.class); right ? so chatbook is our application which we mapped in multiple port but spring boot looking a service with name chatbook-application/chatbook so that's what the problem ..

  • @navyaswarup9573
    @navyaswarup9573 11 หลายเดือนก่อน +1

    How to set 3 ports?

    • @Javatechie
      @Javatechie  11 หลายเดือนก่อน

      Change in application.properties and start it

    • @navyaswarup9573
      @navyaswarup9573 11 หลายเดือนก่อน

      But, if we first run it on port 8001 then 8002 then 8003. So in my case it's working on 8003 port only. Not on other port numbers.

    • @navyaswarup9573
      @navyaswarup9573 11 หลายเดือนก่อน

      @@Javatechie i try the same method showed in the video but when i use server.port= 8001 and other, its taking the last port only not showing the result on other port as the reason is that i am running that application and the port which is mentioned in the application (the last port) will be running not other ports will run as they are off.

    • @navyaswarup9573
      @navyaswarup9573 11 หลายเดือนก่อน

      @@Javatechie is i am missing any logic or configuration ?

  • @bhaskarverma9810
    @bhaskarverma9810 4 ปีที่แล้ว +2

    Hi sir i need to ask you about my career counselling , can you share your email id so i can mail you.

    • @Javatechie
      @Javatechie  4 ปีที่แล้ว

      javatechie4u@gmail.com

  • @mowglishihtzutoy5197
    @mowglishihtzutoy5197 3 ปีที่แล้ว +1

    good tutorial ...but poor english .....