Skip to content

v0.1.4

Compare
Choose a tag to compare
@mostafa mostafa released this 02 Jan 23:03
· 1409 commits to main since this release
989bbd5

Changes in this milestone (v0.1.x)

This is the latest release of the v0.1.x milestone that significantly contributed to the overall stability of GatewayD. A lot of changes has gone into this milestone including the following:

  1. Fixed concurrent connection handling and management.
  2. Changed parameter type of HookConfig.Run to receive map[string]interface{} and convert it to structpb.Struct internally to remove lots of boilerplate code.
  3. Improved error handling by wrapping/unwrapping package-level errors into GatewayDError with lots of custom errors for different parts of the system.
  4. Added more tests.
  5. Improved client code by introducing chunk reading of the buffer to prevent hanging and introduction of deadlines (timeouts).
  6. Added mechanism to retry the connection after close by the server.
  7. Used structured logging everywhere.
  8. Added comments to code and docstrings to all functions.
  9. Improved traffic hooks by removing a lot of duplicate code and cleanups.
  10. Added TCP Keep-Alive to client connections.
  11. Partially fixed stale connection issues until the issue I investigated is resolved, as quoted below:

    PostgreSQL has an authentication timeout of 60s that waits till the client authenticates. The current design of GatewayD makes the TCP connection and waits for the connecting clients of GatewayD to authenticate via the proxied connection to PostgreSQL. This causes connections to become stale over time due to timeout. I need to start developing PostgreSQL-specific features for authentication and other related components, either with the plugins or the core.

Changes in the current release

In this release, I've tried to improve the code as best as I can. The connection stability is greatly improved, however the connections will somehow time out and become stale, although new connections will help re-instantiate the client object, which fixes the problem, but this is not enough. My fixes in this release help detect the issue earlier and close the ingress connection abruptly, which is not what I intend to do. The other change is improvements to hook system by addressing a few edge cases. I also added a TCP keepalive to the client connections.

What's Changed

Full Changelog: v0.1.3...v0.1.4