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

Tune S3 for performance improvements. #79

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f3e1374
Tune S3 for performance improvements.
samiwelthomasHO Nov 22, 2024
ef519bc
Update http handler package.
samiwelthomasHO Nov 22, 2024
c4387d7
Remove max concurrent connection.
samiwelthomasHO Nov 22, 2024
a84a721
reoder import
mahrufiqbalHO Nov 24, 2024
c3ce57b
remove import
mahrufiqbalHO Nov 24, 2024
8ed6a28
reorder import
mahrufiqbalHO Nov 24, 2024
4a2bed4
reorder import
mahrufiqbalHO Nov 24, 2024
5dbc060
reorder import
mahrufiqbalHO Nov 24, 2024
03edd6d
remove @smithy/node-http-handler
mahrufiqbalHO Nov 24, 2024
21f35e1
increase the chunkSizeBytes
mahrufiqbalHO Nov 26, 2024
e546296
set useAccelerateEndpoint to true
mahrufiqbalHO Nov 26, 2024
791c239
set useAccelerateEndpoint to true
mahrufiqbalHO Nov 26, 2024
5cf0f32
Add accelerate endpoint to S3 client.
samiwelthomasHO Nov 27, 2024
314a1e2
Update CSP header.
samiwelthomasHO Nov 27, 2024
9347eca
Increase in flight upload size.
samiwelthomasHO Nov 27, 2024
9d5e304
set MAX_PARALLEL_UPLOADS to 2
mahrufiqbalHO Nov 27, 2024
c9ce246
Increase to 6 parallel uploads.
samiwelthomasHO Nov 27, 2024
5f8056c
Remove DEA rate limiting.
samiwelthomasHO Nov 27, 2024
4145d31
remove promisesSize code
mahrufiqbalHO Nov 27, 2024
319bbf2
increase MAX_PARALLEL_UPLOADS 10 and chunkSizeBytes 500
mahrufiqbalHO Nov 28, 2024
6eaf305
set chunkSizeBytes 400
mahrufiqbalHO Nov 28, 2024
ce332a6
set chunkSizeBytes 300
mahrufiqbalHO Nov 28, 2024
fd8db22
set parallel to 6
mahrufiqbalHO Nov 28, 2024
0b1f74b
Send upload command immediately.
samiwelthomasHO Nov 28, 2024
1d282ed
Fix linting errors.
samiwelthomasHO Nov 28, 2024
a7ae30b
set chunkSizeBytes 300
mahrufiqbalHO Nov 28, 2024
e4b17be
axios test
mahrufiqbalHO Nov 28, 2024
a708d91
axios test
mahrufiqbalHO Nov 28, 2024
2623985
axios test
mahrufiqbalHO Nov 28, 2024
81a5c5a
axios test
mahrufiqbalHO Nov 28, 2024
5fcf1a3
axios test
mahrufiqbalHO Nov 28, 2024
041dfa3
axios test
mahrufiqbalHO Nov 28, 2024
92a840d
axios test
mahrufiqbalHO Nov 28, 2024
a389efc
revert changes and update client-s3 sdk
mahrufiqbalHO Nov 29, 2024
4a1824b
revert client-s3 sdk
mahrufiqbalHO Nov 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/dea-backend/src/constructs/dea-backend-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export class DeaBackendConstruct extends Construct {
const datasetsBucket = new Bucket(this, 'S3DatasetsBucket', {
blockPublicAccess: BlockPublicAccess.BLOCK_ALL,
bucketKeyEnabled: true,
transferAcceleration: true,
encryption: BucketEncryption.KMS,
encryptionKey: key,
enforceSSL: true,
Expand Down
1 change: 1 addition & 0 deletions source/dea-ui/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@aws-sdk/client-cognito-identity": "~3.474.0",
"@aws-sdk/client-cognito-identity-provider": "~3.474.0",
"@aws-sdk/client-s3": "~3.474.0",
"@aws-sdk/node-http-handler": "^3.374.0",
"@aws/dea-app": "workspace:*",
"@cloudscape-design/collection-hooks": "^1.0.20",
"@cloudscape-design/component-toolkit": "~1.0.0-beta.25",
Expand Down
10 changes: 10 additions & 0 deletions source/dea-ui/ui/src/components/upload-files/UploadFilesForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
UploadPartCommandInput,
UploadPartCommandOutput,
} from '@aws-sdk/client-s3';
import { NodeHttpHandler } from '@aws-sdk/node-http-handler';
import {
Alert,
Box,
Expand Down Expand Up @@ -119,9 +120,14 @@ function UploadFilesForm(props: UploadFilesProps): JSX.Element {
async function uploadFilePartsAndComplete(activeFileUpload: ActiveFileUpload, chunkSizeBytes: number) {
const initiatedCaseFile = await initiateUpload(activeFileUpload.upoadDto);

const MAX_CONCURRENT_REQUESTS = 100;

let federationS3Client = new S3Client({
credentials: initiatedCaseFile.federationCredentials,
region: initiatedCaseFile.region,
requestHandler: new NodeHttpHandler({
maxConcurrentRequests: MAX_CONCURRENT_REQUESTS,
}),
});

const credentialsInterval = setInterval(async () => {
Expand All @@ -133,6 +139,10 @@ function UploadFilesForm(props: UploadFilesProps): JSX.Element {
federationS3Client = new S3Client({
credentials: refreshRequest.federationCredentials,
region: initiatedCaseFile.region,
useAccelerateEndpoint: true,
requestHandler: new NodeHttpHandler({
maxConcurrentRequests: MAX_CONCURRENT_REQUESTS,
}),
});
}, 20 * MINUTES_TO_MILLISECONDS);

Expand Down
Loading