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

Hetzner server types #784

Closed
schonert opened this issue Oct 9, 2024 · 11 comments
Closed

Hetzner server types #784

schonert opened this issue Oct 9, 2024 · 11 comments

Comments

@schonert
Copy link

schonert commented Oct 9, 2024

This is awesome!

Would we be able to add more server types to the hetzner list? https://github.com/vitabaks/postgresql_cluster/blob/c9c9f02d0dd7991e3966f0e6c35dd4f3d3c45af0/console/db/migrations/20240520144338_2.0.0_initial_scheme_setup.sql#L295-L302

I could stitch together a PR - altho not sure if there's a good reason to limit it to these 8.

@vitabaks
Copy link
Owner

vitabaks commented Oct 9, 2024

Hi. Yes, we can add other types. Which ones are you interested in?

As far as I recall, all available server types are included, except for shared CPUs, which were not added because they are not recommended for production use.

Additionally, you can modify or add types in the database of your console installation.

@schonert
Copy link
Author

schonert commented Oct 9, 2024

I was interested in beefier shared CPUs. So CX32 and above, CPX31 and above, and CAX21 and above.

Not under the impression that they are not recommended for production?

Additionally, you can modify or add types in the database of your console installation.

Arhh great point!

@vitabaks
Copy link
Owner

vitabaks commented Oct 9, 2024

I see that only 6 types of servers are present with a dedicated CPU:

image

All of them are in the console database.

I was interested in beefier shared CPUs. So CX32 and above, CPX31 and above, and CAX21 and above.

Servers with shared vCPUs are not suitable for production databases because they do not guarantee consistent performance. Virtual CPUs on these servers are shared among multiple virtual machines, which can lead to unpredictable delays and reduced speed under heavy workloads. This is particularly critical for databases, where steady access to resources is essential to ensure low-latency responses and stable performance under load.

I could stitch together a PR - altho not sure if there's a good reason to limit it to these 8.

Yes, we could add all available types (with the exception of arm, since its support has not yet been implemented), but in this case it is necessary to explicitly mark the "Shared vCPU" types in the UI.

@vitabaks
Copy link
Owner

vitabaks commented Dec 9, 2024

Feel free to suggest a PR

cc @schonert @nelsonic

@schonert
Copy link
Author

schonert commented Dec 9, 2024

I got sidetracked.

... it is necessary to explicitly mark the "Shared vCPU" types in the UI.

I was put off by the suggestion to add mark in the UI - not that I disagree. It would require me to look into how to best add an additional field to the database and then later populate the frontend.

Altho, thinking about it again, made me realise that we could just add it to the instance_name. Eg. CCX63 (Shared vCPU). Agree?

@vitabaks
Copy link
Owner

vitabaks commented Dec 9, 2024

Yes, I would really like to mark shared vCPU in the user interface so that users do not accidentally choose this type for production.

Related PR #835

@nelsonic
Copy link
Contributor

If we agree that the Shared vCPU / Dedicated vCPU string should be added to the instance_name, ➕
happy to include it in my current PR #835 so it's one-and-done. :shipit:

nelsonic added a commit to nelsonic/autobase that referenced this issue Dec 11, 2024
@nelsonic
Copy link
Contributor

#835 contains the (Shared vCPU) / (Dedicated vCPU) string in instance_name via nelsonic@2235709 👌

@nelsonic
Copy link
Contributor

As noted by @vitabaks in #835 (comment), 💬
we cannot change the instance_name to include the additional string as it will mess with deployment. 👎
i.e. hetzner API will not recognise "CX22 (Shared vCPU Intel)" when attempting to create a VPS. 🚫

So will revert that last commit. ♻️

Instead, proposing adding the new shared_cpu field to public.cloud_instances as:

ALTER TABLE ONLY public.cloud_instances
ADD COLUMN 'shared_cpu' BOOLEAN DEFAULT FALSE;

Then setting the boolean as V has suggested. 👌

nelsonic added a commit to nelsonic/autobase that referenced this issue Dec 11, 2024
@nelsonic
Copy link
Contributor

Please see: 025bbd3 🙏

@nelsonic
Copy link
Contributor

#835 merged. :shipit:

@schonert pls check if this resolves your OP. 🤞

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

No branches or pull requests

4 participants
@nelsonic @schonert @vitabaks and others