NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules, #3059 by repository stars
Latest stable
v0.11.1
Last release 9 months ago
22 Feb 2026
Release timing varies
gaps range from 8 days to 6 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
127 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Shutdown metrics server gracefully by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/335
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.8.0...v0.8.1
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
This release contains a feature: linting global and plugins configuration files before loading those configuration files and running Gateway, and a re
This release contains a feature: linting global and plugins configuration files before loading those configuration files and running Gateway, and a refactoring: the configurable hard and soft limits are removed, as they were causing issues.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.10...v0.8.0
1. Windows Executables and Dependency Updates:
1. Windows Executables and Dependency Updates:
gnet/v2@v2.3.0 library.2. Docker Image Integration:
3. Contribution Guides and Windows Plugin Support:
gatewayd plugin install command.4. Binary Data Transfer Protocol:
5. Plugin Management Enhancements:
gatewayd plugin list subcommand to list existing plugins.gatewayd plugin install command to support local installation from archive files. Now you can download the plugin from your desired source and use the command to install and configure it.6. CycloneDX SBOMs and Code Coverage:
7. Maintenance and Testing:
plugin install command.This release includes various enhancements, bug fixes, and updates to improve the GatewayD platform.
Full Changelog: v0.7.0...v0.7.10
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.9...v0.7.10
Nothing published for this version
This release contains a lot of new tests for different parts of the system including fairly detailed tests for commands. This new version is released,
This release contains a lot of new tests for different parts of the system including fairly detailed tests for commands. This new version is released, because a few bugs has been found and fixed while writing tests. Also, all the dependencies are updated to their latest versions.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.8...v0.7.9
Nothing published for this version
This is a fix release to fix a regression in the plugin install command.
This is a fix release to fix a regression in the plugin install command.
plugin install command by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/323Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.7...v0.7.8
This is a maintenance release, and it contains a few changes:
This is a maintenance release, and it contains a few changes:
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.6...v0.7.7
This release only contain support for publishing images to Docker Hub.
This release only contain support for publishing images to Docker Hub.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.5...v0.7.6
This release contains two new feature:
This release contains two new feature:
gatewayd plugin list, that lists all the plugins currently existing in your gatewayd_plugins.yaml config file. You can use -e to filter only enabled plugins.gatewayd plugin install command accepted a GitHub URL to install a plugin. Now, it supports installing them from a locally downloaded file. So, instead of passing a URL to this command, you can pass a file path, and it'll try to install the plugin from that file, which is particularly useful for air-gapped systems, for example:# Download gatewayd-plugin-cache v0.2.4 into disk
wget https://github.com/gatewayd-io/gatewayd-plugin-cache/releases/download/v0.2.4/gatewayd-plugin-cache-linux-amd64-v0.2.4.tar.gz
# Install the plugin from the downloaded archive
gatewayd plugin install gatewayd-plugin-cache-linux-amd64-v0.2.4.tar.gz
Note that you can download the file using the gatewayd command itself without installing it, that is, it'll acts as an HTTP client and downloads the specified or latest version of the plugin archive and verifies its checksum. The checksum of the downloaded archive won't be checked if you download the file manually and run the install with an archive filename. However, the checksum of the plugin executable inside the archive will always be checked.# Pulls the latest version of the plugin to disk
gatewayd plugin install --pull-only github.com/gatewayd-io/gatewayd-plugin-cache@latest
# Installs the plugin from the downloaded archive file
gatewayd plugin install gatewayd-plugin-cache-linux-amd64-v0.2.4.tar.gz
Note:
The help is available for all the commands, subcommands and flags of the gatewayd command. You just need to pass -h or --help at the end of the command.
plugin list subcommand by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/308Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.4...v0.7.5
This release contains minor fixes to the GitHub Actions workflows and the plugin install subcommand.
This release contains minor fixes to the GitHub Actions workflows and the plugin install subcommand.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.3...v0.7.4
This release contains a breaking change that'll break all the plugins built with previous versions of the GatewayD plugin protocol. This new change ad…
This release contains a breaking change that'll break all the plugins built with previous versions of the GatewayD plugin protocol. This new change adds the ability to transfer binary data as-is between GatewayD and its plugins, instead of converting it back and forth to base64-encoded strings.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.2...v0.7.3
This release contains a few guides for contribution, code of conduct, PR and issue templates. It also contain a new feature that let's Windows machine
This release contains a few guides for contribution, code of conduct, PR and issue templates. It also contain a new feature that let's Windows machines to download and install GatewayD plugins.
gateway plugin install command by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/303Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.1...v0.7.2
This release contains dependency updates and the introduction of Docker image.
This release contains dependency updates and the introduction of Docker image.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.7.0...v0.7.1
We are excited to announce a significant update in this release: the addition of Windows executables for both AMD64 and ARM64 architectures. This enha
We are excited to announce a significant update in this release: the addition of Windows executables for both AMD64 and ARM64 architectures. This enhancement is made possible by the new release of the gnet/v2@v2.3.0 library. Furthermore, we have also updated all other dependencies to their latest versions. Note that this feature is still experimental, and needs more testing.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.9...v0.7.0
Go is updated to version 1.20, along with all dependencies.
1. Go and Dependencies Update:
2. API Port Changes:
3. Timeout Implementation for Plugin Hooks:
gatewayd_plugins.yaml file.4. Configuration Subcommand:
config subcommand with two options:
config init: Generates a new global configuration file.config lint: Validates the global configuration file.5. Plugin Subcommand:
plugin subcommand with three options:
plugin init: Generates a new plugins configuration file.plugin lint: Validates the plugins configuration file.plugin install github.com/gatewayd-io/gatewayd-plugin-cache@latest: Downloads and installs the latest version of gatewayd-plugin-cache or a tagged version following semver.6. New Policy Parameter:
terminationPolicy, to determine whether to stop processing hooks when terminating a request or continue running the remaining hooks.7. Bug Fixes and Improvements:
8. Package Additions:
9. Configuration Changes:
/etc, with fallback to the current working directory.New<feature> functions to the config package.10. Metrics Port Update:
2112 to 9090 to align with Prometheus port.11. Documentation Update:
12. Miscellaneous:
SHA256SUM function and its tests in favor of SecureConfig.requires config option in the plugin config.This release also includes numerous other fixes, improvements, and cleanups.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.8...v0.6.9
This release adds a new plugin subcommand that can be used to initialize a new plugins configuration file, validate its contents and download and inst
This release adds a new plugin subcommand that can be used to initialize a new plugins configuration file, validate its contents and download and install plugins from GitHub repositories as show below. It also contains dependency updates and tweak to make GatewayD work better and more efficient.
# Generates a new plugins configuration file
$ gatewayd plugin init -p gatewayd_plugins.yaml
# Validates plugins configuration file
$ gatewayd plugin lint -p gatewayd_plugins.yaml
# Downloads and installs the latest version of gatewayd-plugin-cache
# You can also use semver tags with "v" prefix
$ gatewayd plugin install github.com/gatewayd-io/gatewayd-plugin-cache@latest
plugin init command by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/268plugin lint command by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/269plugin install subcommand by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/273Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.7...v0.6.8
This release contains two fixes:
This release contains two fixes:
New<feature> functions to the config package.2112 to 9090 to conform with Prometheus port.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.6...v0.6.7
This release contains many fixes and a new feature: non-default config groups will receive default values for each config object.
This release contains many fixes and a new feature: non-default config groups will receive default values for each config object.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.5...v0.6.6
This release contains three changes:
This release contains three changes:
gatewayd.yaml and gatewayd_plugins.yaml are now read from the current working directory, then the /etc, and the fallback will be the current working directory. Loading the config is done at a later stage.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.4...v0.6.5
This release contain a bugfix that resulted in addition of a new policy parameter for determining whether to stop processing hooks when one wants to t
This release contain a bugfix that resulted in addition of a new policy parameter for determining whether to stop processing hooks when one wants to terminate the request or continue running the rest of the hooks. This also adds a few more validation rules for validating the global config file.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.3...v0.6.4
This release contains a new feature and a few fixes to configuration handling of GatewayD. There is a new subcommand, config, that can be used to mana
This release contains a new feature and a few fixes to configuration handling of GatewayD. There is a new subcommand, config, that can be used to manage GatewayD global configuration file. The config init will generate or overwrite (using -f) the global configuration file. The config lint will validate the global configuration file to find inconsistencies.
config command by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/246Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.2...v0.6.3
This release contains updates and the fix to a long-standing issue that caused clients to wait indefinitely for reading from the server. The dependenc
This release contains updates and the fix to a long-standing issue that caused clients to wait indefinitely for reading from the server. The dependencies are also updated to the latest versions.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.1...v0.6.2
In this release, these changes has been made:
In this release, these changes has been made:
requires in the plugin config.nil.SHA256SUM function and its tests in favor of secure config.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.6.0...v0.6.1
This release contains these changes:
This release contains these changes:
timeout parameter can be adjusted in the gatewayd_plugins.yaml file.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.6...v0.6.0
This release officially marks the end of the v0.5.x milestone. This milestone contained all these features, fixes and cleanups:
This release officially marks the end of the v0.5.x milestone. This milestone contained all these features, fixes and cleanups:
/swagger.json. The specification document can be viewed and interacted with using the Swagger UI, which is accessible via /swagger-ui/.--dev persistent (global) flag for the gatewayd command that can be used by plugin developers to bypass checksum validation of plugins in development.gatewayd_plugins.yaml config file, called ReloadOnCrash, to reload a crashed plugin upon the next scheduled call to the plugin health check, if enabled. The default is true.--usage-report=false to the gatewayd command.client.ID.bytes.Buffer instead of append to a byte array to handle large inputs passed between the client, the server and the plugins.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.5...v0.5.6
This release contains a few fixes:
This release contains a few fixes:
client.ID is not empty by (https://github.com/gatewayd-io/gatewayd/commit/d72bd1b0ec65257b979e832ea379ee65a9f9d084)Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.4...v0.5.5
This release contains a breaking change to how hooks are used. Hook names used to be string constants. This was error prone, as it was easy to misspel…
This release contains a breaking change to how hooks are used. Hook names used to be string constants. This was error prone, as it was easy to misspell the hook name and keep watching the console to see nothing showing up from the method. The protobuf schema now has a HookName enumerator that contains a list of all the hook names. It is used in GatewayD core, plugin template and SDK. Currently, the plugins doesn't fully support this, so one needs to convert the enum value to an int32, but this will change soon.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.3...v0.5.4
This release contains two things:
This release contains two things:
No other information is recorded, but if you're still concerned about your privacy, use --usage-report=false flag to disable usage reporting.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.2...v0.5.3
This release contains a very important feature that increases the stability and reliability of GatewayD: reloading plugins on crash. If reloadOnCrash
This release contains a very important feature that increases the stability and reliability of GatewayD: reloading plugins on crash. If reloadOnCrash is enabled, the plugin will be reloaded from disk with an already loaded plugins' config.
gatewayd_plugins.yaml by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/184Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.1...v0.5.2
In this release I added --dev persistent (global) flag to the gatewayd command. This helps plugin developers bypass checksum validation while developi
In this release I added --dev persistent (global) flag to the gatewayd command. This helps plugin developers bypass checksum validation while developing their plugins.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.5.0...v0.5.1
This release includes a lot of fixes and cleanups, along with the new experimental Administration API, aka. Admin API. This is the very first iteratio
This release includes a lot of fixes and cleanups, along with the new experimental Administration API, aka. Admin API. This is the very first iteration of the API and has limited functionality. For now, only a fraction of what I intended to build is developed, which includes these endpoints. Some or all of them will possibly change in the future.
Version returns GatewayD version info.GetGlobalConfig returns global configuration.GetPluginConfig return plugins configuration.GetPlugins returns active plugin information.GetPools returns active pools, their size and capacity.GetProxies returns list of active proxies, along with available and busy connections.GetServers returns list of active servers.The API is exposed both on gRPC (port 9090) and HTTP (port 8080). The HTTP API includes a gateway to the GRPC endpoints along with a few more endpoints:
/v1/GatewayDPluginService/* routes to the gRPC API endpoints mentioned above./health returns OK status./version returns GatewayD version. This is like Version endpoint in GRPC, but without version details./swagger.json returns an OpenAPI v2 specification document in JSON./swagger-ui/ loads the Swagger UI for swagger.json.The swagger.json and the Swagger UI endpoints are only available if the GatewayD binary is built with -tags embed_swagger. If is included in the release binary by default. The protobuf file is available at gatewayd/api/v1/api.proto, but it'll be moved to the plugin SDK soon.
The README is updated with the latest information about various components of GatewayD.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.4.5...v0.5.0
This release officially marks the end of the milestone v0.4.x. This milestone contained a lot of stability improvements and features:
This release officially marks the end of the milestone v0.4.x. This milestone contained a lot of stability improvements and features:
proxy.passthrough to reduce complexity.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.4.4...v0.4.5
This release includes two minor fixes:
This release includes two minor fixes:
enableMetricsMerger parameter in the plugins config, gatewayd_plugins.yaml, to enable/disable metrics merger.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.4.3...v0.4.4
Refactor proxy passthrough by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/153
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.4.2...v0.4.3
This release contains a long-standing fix I needed to make: multi-tenancy. Now, one can add multiple configurations to each config directive, and star
This release contains a long-standing fix I needed to make: multi-tenancy. Now, one can add multiple configurations to each config directive, and start listening on multiple ports with separate loggers, pools, proxies and clients. For now, only one default config is supported for the metrics server, until there's a use case to have multiple ones. Sentry, metrics merger, plugin health checks, plugins registry and plugins are shared among all the servers. In the original ticket, #148, I suggested that if there's no config, the default config will be used, but for now, that's only true for loggers, clients and metrics.
run command by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/151 (#148, #83)Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.4.1...v0.4.2
This release contains a few fixes and a new feature:
This release contains a few fixes and a new feature:
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.4.0...v0.4.1
This release contains a few cleanup that was way overdue:
This release contains a few cleanup that was way overdue:
This release officially marks the end of milestone 0.3.x. 🚀 The focus of the milestone was on reliability and most of the tickets belong to that overa
This release officially marks the end of milestone 0.3.x. 🚀 The focus of the milestone was on reliability and most of the tickets belong to that overarching goal. These are overall the changes:
version command to get information the running version of GatewayD core (for now), commit, time, Go version, architecture and OSDefaultLogger./gatewayd run --sentry=false)GatewayD core seems mature enough for handling multiple plugins and the focus of the next milestones will be on creating new plugins to harness the power of the core. Plus, the core will be adjusted based on plugins' needs.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.3.4...v0.3.5
This release was made to test the CD workflow and subsequently the goreleaser. Changelogs from this release on will be published like below with an in
This release was made to test the CD workflow and subsequently the goreleaser. Changelogs from this release on will be published like below with an introduction.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.3.3...v0.3.4
This release contain two major changes:
This release contain two major changes:
DefaultLogger for plugin registry and the rest of the code, right before the other logger is actually initialized.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.3.2...v0.3.3
In this release, the focus was on improving the logging feature and the overall stability of the tests:
In this release, the focus was on improving the logging feature and the overall stability of the tests:
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.3.1...v0.3.2
This release contains slight refactoring of the metrics merger functionality. The version command is also added to get the information about the runni
This release contains slight refactoring of the metrics merger functionality. The version command is also added to get the information about the running GatewayD executable. All configuration handling code has been moved from the run command into the config package, which makes the code more readable and easier to debug and maintain.
There was an issue with the CI jobs, which resulted in tests failing unexpectedly. My initial guess is because of running PostgreSQL both as a service in the test-plugin job and as embedded server in the test job. I made them serial, so that test-plugin job runs after test job succeeds. This should be fixed in the future and there should only be one PostgreSQL service for all the tests.
version subcommand by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/127Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.3.0...v0.3.1
This release contains a very useful feature: exposing metrics from GatewayD and collecting, merging, relabeling and exposing metrics from plugins alon
This release contains a very useful feature: exposing metrics from GatewayD and collecting, merging, relabeling and exposing metrics from plugins along with it. The plugins can expose their metrics on HTTP via a Unix domain socket, like /tmp/gatewayd-plugin-test.sock. Upon start GatewayD loads the plugins and registers their UDS path by retrieving their compile-time configuration, which happens on plugin registration by calling the plugin's GetPluginConfig method. Later in the initialization process, an async scheduler runs to periodically scrap metrics from plugins that expose metrics.
Upon each round of scraping metrics, GatewayD will merge and relabel the plugins' metrics with the name of the plugin. That is, gatewayd_test_metric_total becomes gatewayd_test_metric_total{plugin="test"}. Also, for the ease of access and the uniformity of metrics, the namespace must be set to "gatewayd". This is not a requirement, and it isn't enforced anywhere, but if not set, it makes metrics hard to find on Prometheus UI and other visualization platforms, especially if they have non-uniform names.
The scheduler runs periodically and the interval between each runs can be set using the metricsMergerPeriod parameter in the plugins' configuration file, gatewayd_plugins.yaml. It is set to 5s by default, but can be adjusted based on demand. Don't try to set it to a very low value unless you absolutely have to. Note that the scheduler runs in singleton mode, and prevents new jobs to be run, if the previous hasn't finished processing, which might be caused by setting the parameter very low.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.2.5...v0.3.0
This release officially marks the end of milestone v0.2.x. This milestone had a lot of changes to the core and the plugin subsystem. The core is more
This release officially marks the end of milestone v0.2.x. This milestone had a lot of changes to the core and the plugin subsystem. The core is more robust and stable and the plugin subsystem can handle a lot of edge cases and issues manifested in the previous milestone and the features needed to be added. Here are the changes:
Add command-line arguments (flags) to plugins via gatewayd_plugin.yaml config file (#75)
Pass environment variables to plugins via gatewayd_plugin.yaml config file (#77)
verificationPolicy: "passdown"
compatibilityPolicy: "strict"
acceptancePolicy: "accept"
plugins:
- name: gatewayd-plugin-test
enabled: True
localPath: ./gatewayd-plugin-test
args: ["--parameter", "value"]
env:
- key=value
checksum: b1cfe3c6b268d904abe405b106ef737da5373912586ff8a16695939c38caf30d
The plugins can optionally opt-in to receive the required MAGIC_COOKIE_KEY and MAGIC_COOKIE_VALUE via environment variables, which can be passed via the above config file. GatewayD needs the following constants to be passed, so it verifies the plugin is valid:
MAGIC_COOKIE_KEY=GATEWAYD_PLUGIN
MAGIC_COOKIE_VALUE=5712b87aa5d7e9f9e9ab643e6603181c5b796015cb1c09d6f5ada882bf2a1872
Add requires field to plugin config to check for loaded plugins required by the current plugin (#81)
Add a new config parser for global and plugin config (#84)
The global config file, gatewayd.yaml, contains a default object for each object except server (for now). This is the foundation to have multiple objects of the same type with different configuration for running multi-tenant servers (TBD), clients, loggers and proxy and to connect to multiple database servers at the same time for aggregations, load-balancing and related functions.
Use multiple sources for configuring GatewayD including environment variables (#86) Multiple sources calls for order of precedence in how different sources affect the result of configurations in GatewayD. This will be the precedence order for loading and applying config:
OnConfigLoaded hooks: plugins override the global configs and has the highest precedence overall.Add two new hooks for controlling traffic (#94, #96 and #98):
| hook type | description |
|---|---|
| OnTraffic | Notification of incoming traffic from the client. |
| OnTrafficFromClient | Traffic is received from the client. This can terminate the connection.1️⃣ |
| OnTrafficToServer | Traffic is sent to the database server. |
| OnTrafficFromServer | Traffic is received from the database server. |
| OnTrafficToClient | Traffic is sent to the client. |
1️⃣ As explained here, it is now possible to terminate the connection before the request even reaches the database server. To achieve this, the plugins needs to have the OnTrafficFromClient RPC endpoint and also expose the hook in their config. Then they can achieve connection termination by setting two variables in the return value of the RPC endpoint:
return structpb.NewStruct(map[string]interface{}{
"terminate": true,
"response": base64.StdEncoding.EncodeToString([]byte{'X', 0, 0, 0, 4}),
})
The terminate variable instructs the proxy to stop sending the received data (from client) to the server. The response variable will be sent back to the client, instead. If there is no response in the return value, the connection from the client will close abruptly.
The use case of the second change mentioned above is to let plugins stop requests from reaching the server, for example in a cache plugin scenario, the plugin should decide whether to return the cached value (of a query, which is the previous server's response) or let the message reach the server (and cache it afterwards). This is now possible using connection termination.
Recycle available connections using an internal in-process scheduler (#101) to avoid having stale and timed-out connections in the pool of available connections
Add custom hooks and the OnHook method for plugin to process those custom hooks #110
Add log file rotation #115 (current release)
Other changes, fixes and cleanups: #80, #82, #104, #105, #106, #109 and #117.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.2.4...v0.2.5
In this release, I've cleaned up the code as best as I can. This release also contains a new hook, OnHook, and the introduction of custom hook names t
In this release, I've cleaned up the code as best as I can. This release also contains a new hook, OnHook, and the introduction of custom hook names to be mapped with OnHook. This way, any hook name can be used to call the OnHook method of the plugins and then return the results based on the hook name in the method's args.
time.Duration parsing by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/105Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.2.3...v0.2.4
This release is considered a stable release, because it contains fixes to the connection handling. So far, GatewayD had the issue of connections becom
This release is considered a stable release, because it contains fixes to the connection handling. So far, GatewayD had the issue of connections becoming stale over time, which was is partially due to how GatewayD works and mainly due to the authentication timeout of TCP connections made to PostgreSQL server. PostgreSQL server has a timeout for TCP connections that connect, but do not authenticate. After the timeout, the connection is alive, and sending data seems to work, however, receiving data from the database server causes io.EOF and connection timeouts. This issue was really hard to detect and it happened often. I tried so many different ways to overcome this, but to no avail. In PR #101 I have introduced an in-process task scheduler to run a cleanup, aka. recycle or retry, job every 60 seconds (default, configurable). The job will iterate through all the available connections in the proxy's connection pool and runs this sequence:
And manual testing shows that the issue is fixed. On top of the 60s interval between running the above loop (job), the scheduled job starts with a delay of 60s. That is, new connections won't be recycled; only stale ones. The rest of the changes are cleanups, fixes, slight refactoring and disabling of the test plugin in favor of the cache plugin.
onTrafficToClient by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/98Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.2.2...v0.2.3
There are two major changes to in this release:
There are two major changes to in this release:
GatewayD now supports configuration parameters from environment variables. The list of environment variables are here and the order of precedence for configs are as follows:
This will be the order of precedence for loading and applying config:
1. Plugin default values.
2. Plugin config file.
3. Environment variables for plugins.
4. Global default values.
5. Environment variables for global config.
6. Global config updated by plugins via `OnConfigLoaded` hooks.
Plugins override the global configs and has the highest precedence overall.
The introduction of new hooks for traffic control. Previously there were 3 traffic control hooks, now they are 5:
| hook type | description |
|---|---|
| OnTraffic | Notification of incoming traffic from the client. |
| OnTrafficFromClient | Traffic is received from the client. This can terminate the connection.1️⃣ |
| OnTrafficToServer | Traffic is sent to the database server. |
| OnTrafficFromServer | Traffic is received from the database server. |
| OnTrafficToClient | Traffic is sent to the client. |
1️⃣ As explained here, it is now possible to terminate the connection before the request even reaches the database server. To achieve this, the plugins needs to have the OnTrafficFromClient RPC endpoint and also expose the hook in their config. Then they can achieve connection termination by setting two variables in the return value of the RPC endpoint:
return structpb.NewStruct(map[string]interface{}{
"terminate": true,
"response": base64.StdEncoding.EncodeToString([]byte{'X', 0, 0, 0, 4}),
})
The terminate variable instructs the proxy to stop sending the received data (from client) to the server. The response variable will be sent back to the client, instead. If there is no response in the return value, the connection from the client will close abruptly.
The use case of the second change mentioned above is to let plugins stop requests from reaching the server, for example in a cache plugin scenario, the plugin should decide whether to return the cached value (of a query, which is the previous server's response) or let the message reach the server (and cache it afterwards). This is now possible using connection termination.
The rest are refactorings, cleanups and fixes.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.2.1...v0.2.2
A breaking change is the introduction of the default config object for loggers, clients, pool and proxy config. Later I'll add support for loading mul…
This release contains a fix to the flaky TestRunServer test, which used to fail the CI workflow every often. The other major change is the introduction of a new package, config, that contains almost all the constants from different packages, new types for unmarshaling koanf config into structs and getters for certain fields that has complex types or multiple values from different internal and external packages. Running run command loads the default values for plugins and global configs first before loading the corresponding config files.
A breaking change is the introduction of the default config object for loggers, clients, pool and proxy config. Later I'll add support for loading multiple config objects for running multiple objects of those types for dealing with different database servers (#83).
TestRunServer test by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/82Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.2.0...v0.2.1
This release contains enhacements to the plugin subsystem.
This release contains enhacements to the plugin subsystem.
requires field for checking if required plugins are loaded or not by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/81Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.1.4...v0.2.0
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 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:
HookConfig.Run to receive map[string]interface{} and convert it to structpb.Struct internally to remove lots of boilerplate code.GatewayDError with lots of custom errors for different parts of the system.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.
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.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.1.3...v0.1.4
This release contains various improvements and fixes to different parts of the code. The retry mechanism is improved, but still needs more work, which
This release contains various improvements and fixes to different parts of the code. The retry mechanism is improved, but still needs more work, which I am gonna invest in the next few releases. I used structured logging and also added as much docstring and comments as I can to clarify everything.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.1.2...v0.1.3
This release contains an important fix that significantly improves stability of the server (https://github.com/gatewayd-io/gatewayd/commit/9a090cfb31a
This release contains an important fix that significantly improves stability of the server (https://github.com/gatewayd-io/gatewayd/commit/9a090cfb31a7d9e24b622ded58ff7ebe4f03ee18) 🎉. I also added more tests and improved the overall client code by introducing configurable parameters for timeouts with defaults.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.1.1...v0.1.2
This release contains two changes:
This release contains two changes:
args parameter type in HookConfig.Run to accept map[string]interface{} instead of *structpb.Struct. This effectively removed a lot of boilerplate needed to deal with structpb.NewStruct.GatewayDError error type to wrap package errors and deal with special error cases.HookConfig.Run by @mostafa in https://github.com/gatewayd-io/gatewayd/pull/51Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.1.0...v0.1.1
This release is the first in a series from the v0.1.x milestone. I tried to fix the concurrent connection handling and sudden freezes when testing Gat
This release is the first in a series from the v0.1.x milestone. I tried to fix the concurrent connection handling and sudden freezes when testing GatwayD using psql command. This is unstable as is, and it needs more time to fix the underlying problem. There original issue presented two major problems:
psql would consider it as chunked response and wait forever, hence freezing.I will revisit this throughout the current milestone, and will try to fix it and make it more stable.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.0.9...v0.1.0
This release contains an adapter that redirects logs from the internal logger of the plugin system, hclog, to the global logger of GatewayD, zerolog.
This release contains an adapter that redirects logs from the internal logger of the plugin system, hclog, to the global logger of GatewayD, zerolog. This release marks the end of the milestone 0.0.x, which was focused on laying the foundation for further development. I tried to achieve correctness and integrity in this milestone, however, there are some stability issues that I'll deal with in milestone 0.1.x. Going forward, documentation becomes an integral part of the project and will be written progressively.
Looking back at the previous releases, a lot has changed. The project was bootstrapped with a few lines of code as a proof of concept to mimic a L4 gateway. Now the GatewayD has a plug-based architecture with many components to help facilitate the inner-workings of the database gateway:
sync.Map from Go stdlib.plugin/v1/plugin.proto and the generated stubs for Go and the plugin interface are available in the same directory. There is a test plugin that shows how to work with hooks. Upon loading of each plugin, its dynamic configuration is read by calling its GetPluginConfig function. This effectively registers the list of hooks that plugin exposes with the hook system. All plugin functions (RPC) are unary for now.onConfigLoaded and it causes the configuration options to be sent to plugins registered for that specific event. Each hook can trigger many plugins and they will be called based on their priority. The returned result of the hook from the plugin will be used to update the configuration dynamically (in-memory). Other hooks might have different side-effects. Some hooks are only notification hooks, so that the plugin can tell when an event happen, plus some pieces of information. The list of hooks are available here. The returned result of each hook from each registered plugin will be passed to the next plugin in the list.
There is a verification function to check the signature of the parameters passed to the hook against the signature of the returned results and acts based on the policy chosen in the global config. There are two modes: strict and non-strict.
ignore: ignore the result of the non-matching hook and continue with the next call to another plugin.abort: abort execution of the hook and return the last returned result from the previous hook.remove: ignores the result of the current registered hook and removes it from the registry, so the next call won't hit it again.passdown.run command with two options for reading: a) the global config file and b) the plugins config file.gatewayd.yaml): for setting up logger, clients, pool, proxy, server and plugins objects.gatewayd_plugins.yaml): for adding the list of plugins to be loaded. Plugins priority is determined by the appearance of the plugin config in the file.onConfigLoaded, to let plugins changes the global configuration before the server boots and after the global config is read, as demonstrated in the test plugin.Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.0.8...v0.0.9
This release includes several changes including the plugin system, major refactoring and adding tests. A new test plugin, gatewayd-plugin-test, is dev
This release includes several changes including the plugin system, major refactoring and adding tests. A new test plugin, gatewayd-plugin-test, is developed to help developers understand how to write a plugin for GatewayD in Go. Plugins can be written in practically any language that can produce and consume protobuf stubs and expose a gRPC interface. For various reasons, the Hashicorp's go-plugin is used to develop the plugin system.
Full Changelog: https://github.com/gatewayd-io/gatewayd/compare/v0.0.7...v0.0.8
One column per quarter.