-
Notifications
You must be signed in to change notification settings - Fork 46
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 rack aware deployment across Azure and GCP #74
Support rack aware deployment across Azure and GCP #74
Conversation
5c62906
to
4322629
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only reason for not yet approving is that I haven't tested these changes out across multiple cloud providers (I need to get access to Azure, for instance).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rogger and I met to discuss this PR yesterday and had some questions/concerns:
- the use of the proximity placement group seems odd, from reading the docs it seems this is meant to do the opposite of splitting nodes up across racks and increasing availability
- there isn't very much consistency in the variable names across the aws/azure/gcp code sets
- we ran into issues with it working as expected when deployed to Azure (I can't recall the exact issue but will post more details)
At the same time the AWS side worked well with a minor change. Since a customer is wanting to have this soon, we thought breaking out the AWS part into it's own PR may be the best approach. More details in this PR: #85
4322629
to
274e131
Compare
@vuldin @r-vasquez regarding your comments above:
The proximity placement group stuff was already in there - I think ideally we want nodes to be as close together as possible (for latency) but respecting the scale-set failure domain constraints. The only risk here is that we get availability problems by pairing them both together. If we see that we'll have to consider making it an either/or.
I agree, at this point the three terraform implementations are pretty disparate. I'm not really fancying a rework, but we should make sure that any new parameter names are consistent. I'll check that.
Grateful for info. It's worked fine for me so far. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I don't have a clear understanding of how availability sets, placement groups, and scale sets work with each other to enable high availability. From reading the docs I would expect that we want to create an availability set whenever ha
is true
.
@@ -1,6 +1,6 @@ | |||
variable "region" { | |||
description = "Azure Region where the Resource Group will exist" | |||
default = "North Europe" | |||
default = "centralus" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README needs to be updated to reflect this change (it still mentions Northern Europe as default).
@@ -8,8 +8,11 @@ resource "azurerm_linux_virtual_machine" "redpanda" { | |||
count = var.vm_instances | |||
resource_group_name = azurerm_resource_group.redpanda.name | |||
location = azurerm_resource_group.redpanda.location | |||
availability_set_id = azurerm_availability_set.redpanda.id | |||
availability_set_id = var.ha ? null : azurerm_availability_set.redpanda.0.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if ha
is true
, then we don't create an availability set? That seems opposite of what we want right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the old behaviour for this provider is that we would automatically deploy machines in an availability set, presumably for resilience. However availability sets don't give the ability to introspect which machines are placed into which fault domain, so there is limited use in terms of rack awareness in Redpanda. We could remove availability sets altogether, other than it would be a change in behaviour from what was there before.
When ha=true
we now deploy into a flexible scale set (with three fault domains) which then gives us information about which fault domain each VM is, that we can use for rack awareness.
I figured there was no harm in leaving the existing behaviour in there, but happy to take advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this helps explain the use of availability sets in this project. Scale set (rather than availability set) is the vehicle for enabling rack awareness, and I was mistakenly trying to understand how the availability set could provide that especially given changes in this PR.
resource_group_name = azurerm_resource_group.redpanda.name | ||
location = azurerm_resource_group.redpanda.location | ||
proximity_placement_group_id = azurerm_proximity_placement_group.redpanda.id | ||
count = var.ha ? 0 : 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same questions as above: this value seems opposite to what I would expect we would want (to create an availability set when ha
is true
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same answer as above
Updated addressing comments. @vuldin be good to get a re-review please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tristans, looks good. I see start-redpanda.yml
is now included as an empty file in this PR, I think that file could be deleted entirely.
@@ -8,8 +8,11 @@ resource "azurerm_linux_virtual_machine" "redpanda" { | |||
count = var.vm_instances | |||
resource_group_name = azurerm_resource_group.redpanda.name | |||
location = azurerm_resource_group.redpanda.location | |||
availability_set_id = azurerm_availability_set.redpanda.id | |||
availability_set_id = var.ha ? null : azurerm_availability_set.redpanda.0.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this helps explain the use of availability sets in this project. Scale set (rather than availability set) is the vehicle for enabling rack awareness, and I was mistakenly trying to understand how the availability set could provide that especially given changes in this PR.
Thanks @vuldin |
When ha variable is set (defaults to false) will create a partition placement group and ensure that nodes are spread between the groups