Это видео недоступно.
Сожалеем об этом.
Microservices Demo | Building Microservices with .NET Core C# | Ocelot API Gateway | Sukhraj
HTML-код
- Опубликовано: 20 сен 2022
- Microservices is a new software architecture. It is based on the Web Services (Web APIs). Microservices are the architectural approach to build applications from small to large scale applications.
An API gateway is an API management tool that sits between a client and a collection of backend services.
Ocelot is a lightweight, open-source, scalable, and fast API Gateway based on . NET Core and specially designed for microservices architecture. Basically, it is a set of middleware designed to work with ASP.NET Core.
It has several features such as routing, caching, security, rate limiting, etc.
Configuration File Syntax
{
"Routes": [
{
"UpstreamPathTemplate": "/gateway/product",
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
"DownstreamPathTemplate": "/api/product",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44339
}
],
"DangerousAcceptAnyServerCertificateValidator": true
},
{
"UpstreamPathTemplate": "/gateway/product/{id}",
"UpstreamHttpMethod": [ "GET", "DELETE" ],
"DownstreamPathTemplate": "/api/product/ProductVersion/{id}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44339
}
],
"DangerousAcceptAnyServerCertificateValidator": true
},
{
"UpstreamPathTemplate": "/gateway/customer",
"UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
"DownstreamPathTemplate": "/api/customer",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44398
}
],
"DangerousAcceptAnyServerCertificateValidator": true
},
{
"DownstreamPathTemplate": "/api/customer/{id}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44398
}
],
"UpstreamPathTemplate": "/gateway/customer/{id}",
"UpstreamHttpMethod": [ "GET", "DELETE" ],
"DangerousAcceptAnyServerCertificateValidator": true
}
],
"GlobalConfiguration": {
"BaseUrl": "localhost:44353"
}
}
Thanks for the very much informative video😀
Nicely explained for beginners!!
Thanks for sharing, Your video is more helpful to me. Could you please make one more video handling large project with ocelot and different-2 environment like dev, UAT and QA how manage?.
❤❤
The httpDelete method cannot be accessed through a URL, Accessing through URL makes it the HttpGet method, otherwise it is informative
Great video! Do you happen to have information on deploying to IIS? I'm currently running some tests, and I can't seem to get it to work
ruclips.net/video/UC4vH7i8fB4/видео.html here the video..
you missing route for get with param
Hey hey please please tell me how did you add microservices to this solutions
You can add Web API and then ocelot to it and configuration file to define streams so that it can work as Gateway...
You have used httpdelete not httpget for productversion endpoint 😅
Is it... Anyways, we can use this method to delete record 😜😝
What if I need to pass json body to post request?
pass json object and handle it in service as model object frombody..
Awesome brother.. can i get source for this to understand better
try to implement the microservices on your own system and if come across any query or questions, you can post here..or can contact me via LinkedIn www.linkedin.com/in/sukhraj-mohammad-655a0bb6