// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 import React, {FunctionComponent, useEffect, useState} from 'react'; import {Container, Button, StatusIndicator} from "aws-northstar"; import Stack from "aws-northstar/layouts/Stack"; import '../home/styles.css'; import {IAppHealth, IAppReady, IAppReplication} from "../../interfaces"; import Grid from "aws-northstar/esm/layouts/Grid"; import { executeRunbook, getAppHealth, getAppReady, getAppReplication, } from "../../data"; import Flashbar, {FlashbarMessage} from "aws-northstar/components/Flashbar"; import Alert from "aws-northstar/components/Alert"; const IntegrationTesting: FunctionComponent = () => { const [appReady, setAppReady] = useState({}); const [appHealth, setAppHealth] = useState({}); const [appReplication, setAppReplication] = useState({}); const [errors, setErrors] = React.useState([]); const [message, setMessage] = React.useState(""); const renderMessage = () => { return (message == ""?
: setMessage("")} > {message} ); } const execute = async () => { try { setMessage("Test Scenario Not Yet Implemented") } catch (err) { const items:FlashbarMessage[] = [ { header: 'Could not get the app state: ' + err.toString(), type: 'error', dismissible: true, } ]; setErrors(items); } } const executeSC001 = async () => { setMessage("Initiated Execution of Scenario 001") let request = await executeRunbook("us-east-1", "Scenario-001", "settlement", "App Rotation", "test").then( (result: any) => { console.log("Received Result :" + JSON.stringify(result)) }); } const executeSC003 = async () => { setMessage("Initiated Execution of Scenario 003") let request = await executeRunbook("us-east-1", "Scenario-001", "trade-matching", "App Rotation", "test").then( (result: any) => { console.log("Received Result :" + JSON.stringify(result)) }); } return (
Rotation Testing
Scenario ID
Application
Action
Scenario
Data Conditions
Hypothesis / Expected Behavior
Execute
SC_001
Settlement
Planned Operational Rotation
Rotate Settlement Application from East to West
No new messages are sent to Trade Matching application during rotation
  • No messages are lost, RPO should be 0 for planned rotations
  • All data in MQ, DynamoDB Global Table and Aurora is available in West region.
  • All new messages submitted after the rotation is completed is successfully processed.
        
SC_002
Settlement
Planned Operational Rotation
Rotate Settlement Application from East to West
Data is submitted to Trade Matching Application, Settlement is quiesced and no data is processed until rotation is completed.
  • No messages are lost, RPO should be 0 for planned rotations
  • All data in MQ, DynamoDB Global Table and Aurora is available in West region.
  • Messages that were processed by Trade Matching while rotation is going on are processed by Settlement after rotation is completed.
  • All new messages submitted after the rotation is completed are successfully processed.
        
SC_003
Trade Matching
Planned Operational Rotation
Rotate Trade Matching Application from East to West
No new messages are sent to Trade Matching application during rotation
  • No messages are lost, RPO should be 0 for planned rotations
  • All data in MQ, DynamoDB Global Table and Aurora is available in West region.
  • All new messages submitted after the rotation is completed are successfully processed.
        
SC_004
Settlement/Trade Matching
Planned Operational Rotation
Rotate Trade Matching and Settlement Application from East to West
No new messages are sent to Trade Matching application during rotation
  • No messages are lost, RPO should be 0 for planned rotations
  • All data in MQ, DynamoDB Global Table and Aurora is available in West region.
  • All new messages submitted after the rotation is completed are successfully processed.
        
SC_005
Settlement/Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of both Trade Matching and Settlement from East to West
Messages are sent to Trade Matching and being processed by trade matching and Settlement applications - Matching data(in Aurora DB) is lagging behind Ingestion data(Dynamo DB) (replicated data in target region)
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
  • RPO is less than 30s
        
SC_006
Settlement/Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of both Trade Matching and Settlement from East to West
Messages are sent to Trade Matching and being processed by trade matching and Settlement application Matching data(in Aurora DB) is ahead of Ingestion data(Dynamo DB) (replicated data in target region)
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
  • Applications need a strategy to address scenarios where data in downstream services/application is ahead of upstream producer
  • There is no data loss after replay
        
SC_007
Settlement/Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of both Trade Matching and Settlement from East to West
Messages are sent to Trade Matching and being processed by trade matching and Settlement application. Settlement Inbound Gateway data is lagging behind Trade Matching Outbound Gateway data
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
        
SC_008
Settlement/Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of both Trade Matching and Settlement from East to West
Messages are sent to Trade Matching and being processed by trade matching and Settlement application. Settlement Inbound Gateway data is ahead of Trade Matching Outbound Gateway data
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
  • Applications need a strategy to address scenarios where data in downstream services/application is ahead of upstream producer
        
SC_009
Trade Matching
Perform Unplanned recovery of Trade Matching from East to West
Perform Unplanned recovery of Trade Matching from East to West
Messages are sent to Trade Matching and being processed by trade matching and settlement applications. Matching data(in Aurora DB) is lagging behind Ingestion data(Dynamo DB) (replicated data in target region)
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
        
SC_010
Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of Trade Matching from East to West
Messages are sent to Trade Matching and being processed by trade matching and settlement applications. Matching data(in Aurora DB) is ahead of Ingestion data(Dynamo DB) (replicated data in target region)
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
  • Applications need a strategy to address scenarios where data in downstream services/application is ahead of upstream producer
        
SC_011
Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of Trade Matching from East to West
Messages are sent to Trade Matching and being processed by matching and Settlement - Settlement Inbound Gateway is lagging behind Trade Matching Outbound Gateway
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
        
SC_012
Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of Trade Matching from East to West
Messages are sent to Trade Matching and being processed by trade matching and Settlement applications - Data in Trade Matching Outbound Gateway (not replicated to target region)is behind data in Settlement Inbound Gateway
  • Messages that are not replicated to west region before recovery may be missing
  • messages from Trade matching to settlement are queued up in MQ
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
  • Applications need a strategy to address scenarios where data in downstream services/application is ahead of upstream producer
        
SC_013
Settlement
Unplanned Disaster Recovery
Perform Unplanned recovery of Settlement from East to West
Messages are sent to Trade Matching and continue to be processed while settlement engine is being recovered.
  • Messages that are not replicated to west region before recovery may be missing
  • Messages from Trade matching to settlement are queued up in MQ
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
        
SC_014
Settlement
Unplanned Disaster Recovery
Perform Unplanned recovery of Settlement from East to West
Messages are sent to Trade Matching and being processed by matching and Settlement-in Settlement application Matching data is lagging behind Ingestion.
  • Messages that are not replicated to west region before recovery may be missing
  • Messages from Trade matching to settlement are queued up in MQ
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlementReconcile and replay data between trade matching and settlement
        
SC_015
Settlement
Unplanned Disaster Recovery
Perform Unplanned recovery of Settlement from East to West
Messages are sent to Trade Matching and being processed by matching and Settlement - Matching data(in Aurora DB) is lagging behind Ingestion data(Dynamo DB) (replicated data in target region)
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
        
SC_016
Settlement
Unplanned Disaster Recovery
Perform Unplanned recovery of Settlement from East to West
Messages are sent to Trade Matching and being processed by matching and Settlement - Settlement Inbound Gateway is lagging (data not replicated to target) behind Trade Matching Outbound Gateway
  • Messages that are not replicated to west region before recovery may be missing
  • Reconcile and replay data within trade matching and settlement
  • Reconcile and replay data between trade matching and settlement
        
SC_017
Settlement/Trade Matching
Unplanned Disaster Recovery
Perform Unplanned recovery of both Trade Matching and Settlement from East to West
Messages are sent to Trade Matching and being processed by trade matching and Settlement applications - Data in trade matching inbound gateway DynamoDB table is not replicated to the target region
  • Messages that are not replicated to west region before recovery may be missing
  • What is the maximum expected replication lag for data in DynamoDB global table and messages in MQ ?
  • RPO should be less than 30s
        
{renderMessage()}
); } export default IntegrationTesting;