<commit_before># TODO

Fine grained list of to do's in order to make ```ecs``` production ready

## Functional

* improve feedback on bad request response
  * CID style + log aggregation / access
  * include errors in response
* sort out ```AsyncContainerLogs``` correctly fetching stdout & stderr
  using a single call to the Docker Remote API - think this mostly comes
  down to sorting out how to interpret the 8-byte header in the response
  from the Docker Remote API
* ```AsyncEndToEndContainerRunner``` needs to deal with failure scenarios
  more effectively - specifically it needs to delete containers on failure
  rather than just exiting
* [limit "size" of acceptable inbound payload](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size)
* error detecting image not found
    * ```curl -v -X POST "http://172.17.42.1:2375/images/create?fromImage=xubuntu&tag=latest"```
```json
{
  "docker_image": "xubuntu",
  "tag": "latest",
  "cmd": [
    "date"
  ]
}
```
    * ```curl -v -s -u $KEY:$SECRET -X POST -H "Content-Type: application/json" --data-binary @echo.json $ECS_ENDPOINT/v1.0/tasks``` will result in ```500 Internal Server Error``` rather than ```404 Not Found```

## Operations

* put 'correct' TLS configuration in nginx
* rate limit based on key - see nginx variable
[$remote_user](http://nginx.org/en/docs/http/ngx_http_core_module.html#var_remote_user)
* deploy across multiple GCE zones
* [enable iptables](https://www.jimmycuadra.com/posts/securing-coreos-with-iptables/)
* 401 from api domain should return json doc rather than HTML
* add instrumentation using ?DataDog? ?SignalFX?
* root CA on Ubuntu when using TLS/SSL certs from SSLs.com
* add status page using [Cachet](https://docs.cachethq.io/docs/get-started-with-docker)
and [Pingdom](https://www.pingdom.com/)
* how should we describe the resources required by 1/ ecs service 2/ apidocs service
* document operational processes 

## Performance

* ```AsyncEndToEndContainerRunner``` should delete container using ```AsyncContainerDelete```
  after responding to the invoker of ```AsyncEndToEndContainerRunner``` - this should eliminate
  ~1 second overhead introduced by ```ecs```

## Documenation

* add rating limiting capability in API docs

## Stability

* (long running) load/stress test<commit_msg>added health check to-do to TODO.md<commit_after># TODO

Fine grained list of to do's in order to make ```ecs``` production ready

## Functional

* improve feedback on bad request response
  * CID style + log aggregation / access
  * include errors in response
* sort out ```AsyncContainerLogs``` correctly fetching stdout & stderr
  using a single call to the Docker Remote API - think this mostly comes
  down to sorting out how to interpret the 8-byte header in the response
  from the Docker Remote API
* ```AsyncEndToEndContainerRunner``` needs to deal with failure scenarios
  more effectively - specifically it needs to delete containers on failure
  rather than just exiting
* [limit "size" of acceptable inbound payload](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size)
* error detecting image not found
    * ```curl -v -X POST "http://172.17.42.1:2375/images/create?fromImage=xubuntu&tag=latest"```
```json
{
  "docker_image": "xubuntu",
  "tag": "latest",
  "cmd": [
    "date"
  ]
}
```
    * ```curl -v -s -u $KEY:$SECRET -X POST -H "Content-Type: application/json" --data-binary @echo.json $ECS_ENDPOINT/v1.0/tasks``` will result in ```500 Internal Server Error``` rather than ```404 Not Found```

## Operations

* put 'correct' TLS configuration in nginx
* rate limit based on key - see nginx variable
[$remote_user](http://nginx.org/en/docs/http/ngx_http_core_module.html#var_remote_user)
* deploy across multiple GCE zones
* [enable iptables](https://www.jimmycuadra.com/posts/securing-coreos-with-iptables/)
* 401 from api domain should return json doc rather than HTML
* GCE forwarding rule should do health checks on nodes
* add instrumentation using ?DataDog? ?SignalFX?
* root CA on Ubuntu when using TLS/SSL certs from SSLs.com
* add status page using [Cachet](https://docs.cachethq.io/docs/get-started-with-docker)
and [Pingdom](https://www.pingdom.com/)
* how should we describe the resources required by 1/ ecs service 2/ apidocs service
* document operational processes 

## Performance

* ```AsyncEndToEndContainerRunner``` should delete container using ```AsyncContainerDelete```
  after responding to the invoker of ```AsyncEndToEndContainerRunner``` - this should eliminate
  ~1 second overhead introduced by ```ecs```

## Documenation

* add rating limiting capability in API docs

## Stability

* (long running) load/stress test
{'fraction_non_alphanumeric': 0.11158342189160468, 'fraction_numerical': 0.011477151965993623, 'mean_word_length': 4.6291866028708135, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '541428', 'n_tokens_mistral': 1483, 'n_tokens_neox': 1377, 'n_words': 507}