Hi Rahul, I am a big fan of your fabulous content . As microservices is hot cake in the market now, I request you to please do few videos related to how and when to go for microservices , different types of database communications in microservices and cross cutting concerns in the same.
Thank you . I have the subtitles option turned on, but looks like RU-vid was unable to autogenerate for this one. If you have any specific questions feel free to ask here. Do check out the other videos in this series as well bit.ly/asp-net-core-series
are you using fiddler or fiddler everywhere version? Maybe you can try setting the HttpClient.DefaultProxy explicitly. You can find more details in this post/video www.rahulpnath.com/blog/jwt_authentication_asp_net_web_api/ Lent know if that helps or if you have additional questions.
Hey Rahul, thanks for the demo. However, I have a request to make a video on IHttpClientFactory With Delegating Handlers also cache the token in serverless scenarios. Looking forward to this..
Hey Deepak, Thank you for your continued support here. That is a good suggestion and I have been planning to do some videos around these area of Http client. When you say cache the token are you referring to tokens used to auth with external/http api's?
This video is really good. Thank you for shearing knowledge. I have one question I am not able to install Fiddler Everywhere tool on my company laptop because of privacy policies. Can you suggest me the other way to test retry and unauthorized policies for poly. Thank you
Thank you Smita. Did you try the Fiddler standalone version? www.telerik.com/download/fiddler Might be good to check with company for exception to install this - great developer tool. Not sure of other ways to do this, could write some custom code, but haven't done that.
@@RahulNath Can you make something to performance of api / response compression/ microservice using ocelot or open source / you can cover on system design with implementation.
I know it's bad practice but can I use polly without a client ? Meaning I have many controller actions and each action has data logic inside (without calling an api endpoint), can I use polly as a global middleware for any request so that it applies the retry policy for any 500 response ? Thanks
yes it will be a bad practice. You don't need polly for this, you can do exception handler and retry in side if its transient errors. If not I suggest looking at message based interaction, so you can automatically retry by reprocessing the whole message.
Thank you Faizal! Sorry missed putting it in description. Have updated it there - Here is the link rahulpnath.visualstudio.com/RU-vid%20Samples/_git/MakingHttpRequest Let me know if you have any other questions.
@@RahulNath Thanks Rahul :) , we are implementing retry in our core project, Please help to command on the below statement. 1, Request timeout and retry both are different but, we always expect a long request more than 100secs then we should set a timeout span, else all retry will fail?. how about setting an infinite time span setup. 2, When setting up a long request timeout, do we need a retry mechanism? since all our HTTP calls get an operation canceled error when added the timeout is fixed. I understand from your video the relevance of retry. Can you please help to understand the relevance of retrying HTTP call against timeout which is set up to infinite time(Client.Timeout = Timeout.InfiniteTimeSpan ) .
@@RahulNath Hi Rahul, actually this is an Azure function,Which can be called external apis multiple times in an minute (300 calls in a day). We are getting a response in 05-150 seconds for each request.
Hi Syed, I guess you could. Add a named client with the retry config you want and use that to resolve an instance every time. Are you facing any issues with it?
Yes, you can. Depends on what error cosmosdb is throwing and if it makes sense to retry. If the error is not transient, then retrying will only give you back the same error. Hope that helps.
Thank you sir.. :) One question : How can we test whether the service is retrying 3 times or not without fiddler? (i tried it but it just return 500 error at the end, so i m not sure if retry is happening or not)
Is there any way we can implement this in asp.net 4.8 framework? Everywhere we search there are core examples but not without core. Little help would be great :-)
Hey Roma, Yes it should be possible. You will need to get an older version thought. This link explains the version compatibility github.com/App-vNext/Polly/wiki/Supported-targets Does that help? What issue are you facing when using it? Do you have a small repo that you can share?
@@RahulNath Actually we are yet to implement it in our project and doing some RND on that but could not find an example like you share in your video for core same as that for (without core). An example is all that is needed from where we can find a starting point. We have ample of api's and adding a code for every api will not be an optimal solution so..
@@romarathi17 Cool makes sense. I think it will be very much the same as with the .NET core. It's been a while since I have used it with .NET fwk. But once you get to implement and if you run into issues, share me a sample repo and I can take a look.
Hi Rahul, I have implemented policy retry in our project. One doubt if all retry did I don't want to return with an exception instead. The next line code after the HTTP call should execute. Can you please help on this.
You can handle the exception in Polly and specify what should happen in that case - More details here github.com/App-vNext/Polly/wiki/Retry Let know if that helps.
Hey Rahul! I noticed one stuff, I have one API which does response compression ..... Output for this api in JSON giving me in compressed form which I can't read but browser is giving me right result.... Why so? How I can resolve this?