Micromesh
This project is for a simple web micro service proxy that will log and route web service requests. The project is based on .NET Core.
Quick usage
The service comes pre-configured with DuckDuck and Postman services, so the easiest ways to test it is to run the mesh via one of the run scripts ./scripts/run.ps1 or ./scripts/run.sh and test it by sending a CURL request to post man.
Windows:
curl -uri http://127.0.0.1:54492/get?foo=bar -headers @{forward-to="postman"}
Mac:
curl -url http://127.0.0.1:54492/get?foo=bar -header "forward-to: postman"
Configuration
The project is built with a goal of being as lightweight as possible both on resources, maintenance and cognitive load.
For logging you can use the built in logging of .NET Core - if you know how to configure that log, you are good.
For service configuration all you need to do is add sections to appsettings.json. Each service has a pool of one or more pre-configured hosts to be selected at random when proxying requests.
"Services": {
"duckduck": [
"http://api.duckduckgo.com:80",
"https://api.duckduckgo.com:443",
"api.duckduckgo.com"
],
"postman": [
"postman-echo.com"
]
}
"ConversationLogging": {
"LoggingEnabled" : "true",
"IncludedServices": [
"foobar",
"foobar-document"
]
},
"RetryPolicy": {
"ExceptionRetryCount": "3",
"StatusCodeRetryCounts": {
"404": "1",
"408": "1",
"500": "1",
"503": "3"
}
}
Routing traffic through the mesh.
You can run the mesh server on any port, and the clients of the mesh should direct the traffic to that IP/URL/Port with a host header that points to one of the configuration items.
Performance Tests
We tested Micromesh using two scenarios as follows:
Scenario 1: Sending 10,000 requests with a small JSON payload.
Scenario 2: Sending 1,000 requests with a payload containing an 827 Kb PDF file.
Below are the results for average request time.
| Test Scenario | Without Micromesh | With Micromesh No Logging | With Micromesh and Logging |
|---|---|---|---|
| Scenario 1 | 10ms | 75ms | 168ms |
| Scenario 2 | 40ms | 100ms | 347ms |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
