how can i implement api gateway in asp.net web api (not .net core) using c#

Web Technologies Web Development 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ Now, we developed many services using asp.net web api (not .net core) we need to develop a gate-way to let the client connect to one end point after that this gateway decide which api to call to process the incoming request and return the response to the client , so web api as a gateway will reroute the request and return the response client <----> api gateway <----> appropriate web api We need to develop it simple as possible ,but with best practise using c# and asp.net web api any ideas ??

Posted on 16 Aug 2022, this text provides information on Web Development related to Web Technologies. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz
api gateway <----> appropriate web api We need to develop it simple as possible ,but with best practise using c# and asp.net web api any ideas ??

-->

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ Ocelot is powerful library but that is used in.Net Core which helps us build resilient gateway and am not sure of similar Asp.net libraries that you can use in this case . If you are unable to find the suitable library or provider (cloud api gateway providers like azure , AWS ) and you have to write your own gateway api then you have to be aware of few things. Best practices for api gateway. Api gateway is very useful but at the same time it can be bottle neck. Your gateway should be resilient and highly available. Depending on your request load you may have to implement patterns like "Circuit breaker" , "Retry" and "bulk head" and for that you can use library called Polly. You can log your requests for debugging and performance monitoring. Security is another aspect but really depends how you implement authentication. You may use combination of following libraries to achieve your goal. https://github.com/App-vNext/Polly https://github.com/reactiveui/refit

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Web Technologies Links

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community