AWS API Throttling, Short Polling to Client/ELB timeouts, Server-Side Caching, Externalised Configuration
LatestMany fixes and improvements - mainly addressing timeouts and AWS API rate limit issues for large clusters.
Client now uses short polling to request cluster data from server. Server returns immediately and continues processing in the background. Server caches cluster data for 30mins with a "forceRefresh" option available to client (exposed as "Reload Server Cache" button). Also externalised server-side defaults into environment-based configuration files.
UI:
- Implemented short polling logic - query the server up to 120 times with 5s intervals (see docs/SHORT_POLLING_FETCH_STATUS.md
- Added "Reload Server Cache" button to UI to force server to refresh cluster data.
- Upgraded bootstrap from v3.3.5 to v3.3.7 for glyphicons including "glyphicons-halflings-regular" fonts.
- Improved error handling.
- Fix 'onError is not a function' bug.
- Fix displaying of server errors. "TypeError: Cannot read property 'length' of undefined at renderGraph (graph.js:103)"
- Handle errors caught before 'graph' object is initialised without causing "Uncaught TypeError: Cannot read property 'append' of undefined" error for graph.
- Show instances even if there are no tasks.
Server:
- Externalised server-side defaults into environment-based configuration files (see docs/CONFIGURATION.md.
- Added ClusterState & ClusterStateCache classes to cache cluster data.
- Added FetchStatus to represent current status of fetching cluster data.
- Improved error handling.
- Added test suite - run tests with "npm run test"
- Upgrade Dockerfile base image to node:9.11.1-alpine
- Added PromiseDelayer class to introduce a 100ms (configurable) delay between ECS API calls to avoid "Rate exceeded" back-pressure issues when running within AWS account.
- Fix "InvalidParameterException: instanceIds can have at most 100 items" error.
- Update to ES6 syntax in places. E.g. Use template strings and "let"/"const"