-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Amazon OpenSearch Service: High Level Constructs For OpenSearch MultiAZWithStandBy Feature #26026
Comments
Is this feature supported by cloudformation? If not, it sounds like we need to create a L3(or at least L2.5) construct for that? |
yes this feature is supported by cloudformation |
You should be able to easily add this now to your template with an escape hatch. Labeled as good first issue, all we need to do is add a boolean prop it appears |
…e flag) (#26082) This fix adds support for the [`MultiAZWithStandbyEnabled`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-clusterconfig.html#:~:text=%3A%20No%20interruption-,MultiAZWithStandbyEnabled,Update%20requires%3A%20No%20interruption,-WarmCount) flag to the [`CapacityConfig`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CapacityConfig.html) interface. If enabled, the `ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY` feature flag set the default value of `MultiAZWithStandbyEnabled` to `true` Closes #26026. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…e flag) (aws#26082) This fix adds support for the [`MultiAZWithStandbyEnabled`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchservice-domain-clusterconfig.html#:~:text=%3A%20No%20interruption-,MultiAZWithStandbyEnabled,Update%20requires%3A%20No%20interruption,-WarmCount) flag to the [`CapacityConfig`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CapacityConfig.html) interface. If enabled, the `ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY` feature flag set the default value of `MultiAZWithStandbyEnabled` to `true` Closes aws#26026. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@AmanRajAWS
|
@tmokmss AutoTuneOptions should be enabled by default on the Cluster can you please share the CDK construct or CFN template where you are facing this issue |
@Aman199825 Thanks. I also found the doc explaining that:
So I checked my configuration and turned out that I'm using
I think this is the reason why I'm seeing the error. I also think CDK should validate this limitation, so I'll submit a PR or issue for this. code to reproduce: import * as cdk from 'aws-cdk-lib';
import { Domain, EngineVersion } from 'aws-cdk-lib/aws-opensearchservice';
import { EbsDeviceVolumeType, Vpc } from 'aws-cdk-lib/aws-ec2';
const stack = new cdk.Stack(app, 'OpenSearchAutoTuneReproduce', {
env: {
region: 'ap-northeast-1',
},
});
const vpc = new Vpc(stack, 'Vpc', {natGateways: 1});
const targetSubnets = vpc.privateSubnets;
new Domain(stack, 'Domain', {
version: EngineVersion.OPENSEARCH_2_11,
capacity: {
dataNodeInstanceType: 't3.medium.search',
dataNodes: targetSubnets.length,
multiAzWithStandbyEnabled: true, // not usable with t3
},
zoneAwareness: {
enabled: true,
availabilityZoneCount: targetSubnets.length,
},
ebs: {
volumeSize: 30,
volumeType: EbsDeviceVolumeType.GP3,
throughput: 125,
iops: 3000,
},
enforceHttps: true,
fineGrainedAccessControl: {
masterUserName: 'admin',
},
nodeToNodeEncryption: true,
encryptionAtRest: {
enabled: true,
},
vpc,
vpcSubnets: [{ subnets: targetSubnets }],
logging: {
auditLogEnabled: true,
slowSearchLogEnabled: true,
appLogEnabled: true,
slowIndexLogEnabled: true,
},
removalPolicy: cdk.RemovalPolicy.DESTROY,
}); |
@Aman199825 Do you know if OR1 and Im4gn instance type supports multi-AZ with standby feature? https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-instance-types.html It's not listed in this doc but I suspect the doc is wrong because these instance types looks new and there's no reason not to support the feature. |
…with standby feature (#29607) ### Issue # (if applicable) Related with #26026 ### Reason for this change #26082 enabled Multi-AZ with Standby by default, but deployment fails if we use t3 instance type, because it does not support the feature. To fail fast, this PR adds validation on synth time. > Multi-AZ with Standby only works with the m5, c5, r5, r6g, c6g, m6g, r6gd and i3 instance types. > https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-multiaz.html > You can use T3 instance types only if your domain is provisioned without standby. > https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-instance-types.html#latest-gen ### Description of changes If the instance type of data node or master node is t3, throws an error. I also considered to automatically set `multiAzWithStandbyEnabled: false` if we detect any t3 instance type, but it would introduce unwanted behavior e.g. in the below case: ```ts // Initial state // multiAzWithStandbyEnabled: true as there's no t3 instance type new Domain(stack, 'Domain', { version: engineVersion, capacity: { dataNodeInstanceType: 'r5.large.search', }, }) // Update domain to add master nodes with t3 instance type new Domain(stack, 'Domain', { version: engineVersion, capacity: { dataNodeInstanceType: 'r5.large.search', masterNodeInstanceType: 't3.medium.search', masterNodes: 3, }, }) // multiAzWithStandbyEnabled suddenly become false! ``` so we just throw an error. ### Description of how you validated changes Added some unit tests. I also confirmed that it results in deployment error if we try to deploy with t3 instance type & `multiAzWithStandbyEnabled : true` for both data node and master node. ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the feature
The OpenSearch Team has recently launched MultiAZWithStandby Feature for OpenSearch Domain. Feature Documentation Link. According to the CDK docs currently there is no high level CDK construct for this feature.CDK Docs link for the MultiAZWIthStandbyFeature
Use Case
The general recommendation is to use high level constructs and due to lack of High level construct for this feature, the CDK template needs to be migrated to use CFN constructs if there is a need to Create an OpenSearchDomain with MultiAZWithStandBy. This serves as a hinderance to the adoption of the MultiAZWithStandBy feature for AWS OpenSearch Domains.
Proposed Solution
Add the MultiAZWithStandByAttribute to the capacityConfig object CDK Doc for CapacityConfig Attribute .
A MultiAZWithStandBy based OpenSearchDomain created using CDK high level constructs should look like
const domain = new Domain(this, 'Domain', {
version: EngineVersion.OPENSEARCH_1_0,
capacity: {
masterNodes: 3,
multiAZWithStandbyEnabled: true (possible values: [true,false])
},
});
Other Information
No response
Acknowledgements
CDK version used
2.84.0
Environment details (OS name and version, etc.)
macOS Ventura 13.4
The text was updated successfully, but these errors were encountered: