Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HA NGINX+ servers #4

Closed
ciroque opened this issue Feb 3, 2023 · 1 comment · Fixed by #5
Closed

Support HA NGINX+ servers #4

ciroque opened this issue Feb 3, 2023 · 1 comment · Fixed by #5

Comments

@ciroque
Copy link
Collaborator

ciroque commented Feb 3, 2023

Is your feature request related to a problem? Please describe

For customers that wish to have NGINX+ LoadBalancers (LBs) on the edge in a High Availability (HA) configuration, the controller needs to support updating each NGINX+ instance individually.

Describe the solution you'd like

One that works. One that is not overly complicated. One that is maintainable.

Describe alternatives you've considered

  • Use the same NGINX+ client for multiple instances
  • Use an NGINX+ client for each instance

Additional context

This is still a Prototype / Proof-of-Concept implementation, but care should still be taken to ensure a smooth transition to production-quality code.

@ciroque
Copy link
Collaborator Author

ciroque commented Feb 3, 2023

The nginx-plus-go-client likes to have the API Endpoint upon creation, it is not necessarily designed to connect to different hosts on the fly.

This means that the choice between creating multiple instances -- depending on the configuration supplied to this controller -- at startup, or creating instances dynamically when events are being handled and the Synchronizer is making updates.

The main tradeoff is between memory and performance; obviously to keep multiple clients around in memory would use more memory than creating them as needed. Conversely, creating them as needed will hurt performance.

There is really no big downside to either approach, the memory consumed by multiple clients would be marginal, as any more than several (5-6 max?) NGINX+ hosts would seem to be the high-end of a HA deployment. Also, the performance of this controller is not critical, there's no need to be intentionally unperformant, but the cost of spinning up clients at update time should not be problematic.

Another consideration is failure scenarios. If the list of clients is created at initialization the Controller could fail out gracefully alerting to the fact that at least one of the NGINX+ instances is not available. Alternatively, creating the clients at update time could raise a warning and update any hosts that are available.

The create-client-on-demand option allows for better resilience overall. Correcting the issue with an unavailable NGINX+ instance and re-triggering the deploy would Just Work™.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant