MaterializeInc / materialize

The Cloud Operational Data Store: use SQL to transform, deliver, and act on fast-changing data.
https://materialize.com
Other
5.72k stars 466 forks source link

storage/sources/mysql: add automated tests for PrivateLink connections #25150

Open morsapaes opened 7 months ago

morsapaes commented 7 months ago

Feature request

Follow-up to #25047, #25027.

Add tests for validating connections over PrivateLink. We've made the decision to skip validation for this connection type for Private Preview, but marked it as a requirement for Public Preview.

jubrad commented 3 months ago

The docs indicate support for privatelink is not yet added for mysql.

{{< note >}}
Support for AWS PrivateLink connections is planned for a future release.
{{< /note >}}

I am currently working on a cloud test for mysql via privatelink though.

The good news for @bobbyiliev is that it looks like the existing lambda's we have in the postgres terraform module seems to work fine here. The setup is going to be almost exactly the same.

There are some gotchas on the RDS setup.

An easy(ish) gotcha on the RDS MYSQL config side is that, at least with v8.0 parameter groups, replica_preserve_commit_order is not available to be set; however, on 8.0.27 and above this will default to the correct value for us, so we may need 8.0 users to be on at least 8.0.27.

A much bigger foot gun is configuration around max_connect_errors. It appears that health checks coming from the AWS target group will count towards SUM_CONNECT_ERRORS, and will, by default, block the NLB after 100 health checks. We'll need to recommend users set this value to it's max value 9223372036854775807 in the parameter group in order to prevent this.

Alternatively, we could suggest users set skip_name_resolve to "1". This appears disable all data in the hosts and host_cache tables. This data could be useful for auditing or debugging, so I wouldn't recommend this approach. cc @rjobanp

rjobanp commented 3 months ago

@jubrad we can mark this closed now, right?