Feature/store configuraton json idented (#328)

* messing around with benchmark.net.seems Ocelot adds about 2ms to a request..lets make this less? :)

* #326 store json indented so it looks nice :P
This commit is contained in:
Tom Pallister
2018-04-24 08:30:17 +01:00
committed by GitHub
parent 636d116491
commit 77211e9f16
14 changed files with 445 additions and 53 deletions

View File

@ -163,7 +163,7 @@ requests. This would also mean that subsequent requests dont use the cookies fro
UseCookieContainer to true unless you have a really really good reason. Just look at your response headers and forward the cookies back with your next request!
SSL Errors
----------
^^^^^^^^^^
Id you want to ignore SSL warnings / errors set the following in your ReRoute config.

View File

@ -69,18 +69,20 @@ In order to get this working add the following to ocelot.json..
"Type": "Eureka"
}
And following the guide `Here <https://steeltoe.io/docs/steeltoe-discovery/>`_ you may also need to add some stuff to appsettings.json. For example the json below
tells the steeltoe / pivotal services where to look for the service discovery server and if the service should register with it.
And following the guide `Here <https://steeltoe.io/docs/steeltoe-discovery/>`_ you may also need to add some stuff to appsettings.json. For example the json below tells the steeltoe / pivotal services where to look for the service discovery server and if the service should register with it.
.. code-block:: json
"eureka": {
"client": {
"serviceUrl": "http://localhost:8761/eureka/",
"shouldRegisterWithEureka": true
"shouldRegisterWithEureka": false,
"shouldFetchRegistry": true
}
}
I am told that if shouldRegisterWithEureka is false then shouldFetchRegistry will defaut to true so you don't need it explicitly but left it in there.
Ocelot will now register all the necessary services when it starts up and if you have the json above will register itself with
Eureka. One of the services polls Eureka every 30 seconds (default) and gets the latest service state and persists this in memory.
When Ocelot asks for a given service it is retrieved from memory so performance is not a big problem. Please note that this code