pnxtech / hydra-router

A service aware router for Hydra Services. Implements an API Gateway and can route web socket messages.
MIT License
60 stars 24 forks source link

Update to hydra-core 1.5.5 and more #153

Closed cjus closed 6 years ago

cjus commented 6 years ago

This hydra-router release uses hydra-core 1.5.5 which includes improvements for using Redis at scale. During our testing, we observed a 50% reduction in write loads to Redis.

The dashboard now shows service instances in sorted order based on service name. Additionally, the dashboard shows the instance information for the hydra-router instance which is serving the dashboard. This should allow for viewing different dashboard by refreshing the page.

The functionality behind the v1/router/stats endpoint was moved to v1/router/log to better describe what it actually does. In this release v1/router/stats points to new functionality which returns statistics regarding HTTP, WebSockets, and errors. The goal is to create a new dashboard screen to visualize this information.

The Dockerfile was updated to use the node:8.9.1-alpine base image to benefit from the performance enhancements in Node 8.9 which is now in LTS. This Hydra-express release uses V8 performance tuning parameters. The Performance tuning section was removed but may be reintroduced at a later time.

RUN echo "net.core.somaxconn = 3072" >> /etc/sysctl.conf && \
    echo "net.ipv4.tcp_max_syn_backlog = 4096" >> /etc/sysctl.conf && \
    echo "net.ipv4.conf.default.rp_filter = 0" >> /etc/sysctl.conf && \
    echo "net.ipv4.tcp_keepalive_time = 120" >> /etc/sysctl.conf && \
    echo "fs.file-max = 2097152" >> /etc/sysctl.conf

Please feel free to test this release at scale and report your finding.

We're adopting the use of artillery (https://artillery.io/) to build an end-to-end test suite for HydraExpress. You can find the beginnings of this in the test folder.

Finally, some cleanup was done to move files into the new lib folder.