EFC PARTNER ESB SizingAwsEnvironment v1

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 34

Yêu cầu bài toán 

Hệ thống đáp ứng cho nhu cầu kinh doanh trong vòng 2 năm tính từ thời điểm triển khai dịch vụ. 

Thông tin yêu cầu của hệ thống: 

STT  Đầu vào 

APP Server 

1  Số lượng người dùng hệ thống 

2  Số người dùng đồng thời 

3  Yêu cầu hệ thống có tính sẵn sàng cao 


APP sử dụng chung với hệ thống khác hay riêng biệt (Thống kê chi

tiết nếu dùng chung ) 
Database 

1  Loại CSDL sử dụng  

2  Database sử dụng chung với hệ thống khác hay riêng biệt 

Thông tin resources các services

STT  Tên service


1 B2B API golang
2 B2B Portal
3 B2B Agency API golang
4 Flexchannel service job golang
5 Flexchannel backend golang && Flexchannel CMS php
6 MongoDB && Elasticsearch
7 elasticsearch
8 mongoDB
9 postgresql
10 redis
11 kafka
ính từ thời điểm triển khai dịch vụ. 

Định cỡ 

80000 người dùng  

2000  người dùng 

Có 

Riêng biệt 

PosgreSQL

Riêng biệt 

Định cỡ 
Vcpu: 4core Ram: 8gb
Vcpu: 2core Ram: 4gb
Vcpu: 4core Ram: 8gb
Vcpu: 4core Ram: 16gb
Vcpu: 4core Ram: 8gb
Vcpu: 4core Ram:16gb
storage: 30GB cho 3 ngày lưu trữ
storage: 50GB cho 7 ngày lưu trữ
storage: 100GB
storage: 10GB
storage: 10GB
Ghi chú 

4000 (đại lý) * 20 (users/đại lý)

Mô hình Cluster 

EC2
a1.xlarge
t3.medium
a1.xlarge
t3.xlarge
a1.xlarge
t3.xlarge
Estimate summary
Upfront cost Monthly cost
0 1484.83

Detailed Estimate
Group hierarchy Region
B2B API golang Asia Pacific (Singapore)
B2B Portal Asia Pacific (Singapore)
B2B Agency API golang Asia Pacific (Singapore)
Flexchannel service job golang Asia Pacific (Singapore)
Flexchannel backend golang Flexchannel CMS php Asia Pacific (Singapore)
MongoDB Elasticsearch Asia Pacific (Singapore)
EKS Asia Pacific (Singapore)
ECR Asia Pacific (Singapore)
KAFKA Asia Pacific (Singapore)
POSTGRESQL Asia Pacific (Singapore)
REDIS Asia Pacific (Singapore)
EIP Asia Pacific (Singapore)
NLB Asia Pacific (Singapore)
WAF Asia Pacific (Singapore)
S3 Standard Asia Pacific (Singapore)
S3 Standard Data Transfer Asia Pacific (Singapore)
AWS Data Transfer Asia Pacific (Singapore)

Acknowledgement
* AWS Pricing Calculator provides only an estimate of your AWS fees and doesn't include any taxes that might apply. Your actu
Total 12 months cost Currency
17817.98 USD
* Includes upfront cost

Description Service Upfront Monthly


B2B API golang Amazon EC2 0 84.288
B2B Portal Amazon EC2 0 49.832
B2B Agency API golang Amazon EC2 0 84.288
Flexchannel service job go Amazon EC2 0 89.448
Flexchannel backend golanAmazon EC2 0 84.288
MongoDB Elasticsearch Amazon EC2 0 93.048
Amazon EKS 0 73
ECR Amazon Elastic Container Registry 0 2
Amazon Managed Streaming for Apache Kafka (MSK) 0 85.588
Amazon RDS for PostgreSQL 0 68.54
Amazon MemoryDB for Redis 0 104.78
Amazon Elastic IP 0 0
Network Load Balancer 0 24.4
AWS Web Application Firewall (WAF) 0 150
S3 Standard 0 1.25
Data Transfer 0 60
AWS Data Transfer 0 430.08

sn't include any taxes that might apply. Your actual fees depend on a variety of factors, including your actual usage of AWS services.
First 12 moCurrency
1011.46 USD
597.98 USD
1011.46 USD
1073.38 USD
1011.46 USD
1116.58 USD
876 USD
24 USD
1027.06 USD
822.48 USD
1257.36 USD
0 USD
292.8 USD
1800 USD
15 USD
720 USD
5160.96 USD

usage of AWS services.


Configuration summary
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 1), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 1), Advance EC2 instance (
Number of EKS Clusters (1)
Amount of data stored (20 GB per month)
Storage per Broker (5 GB), DT Inbound: Not selected (0 TB per month), DT Outbound: Not selected (0 TB per month), DT Intra-
Storage volume (General Purpose SSD (gp2)), Storage amount (5 GB), Nodes (2), Instance Type (db.t3.micro), Utilization (On-D
Nodes (0), Instance type (db.r6gd.2xlarge), Utilization (On-Demand only) (100 %Utilized/Month), Pricing strategy (OnDemand)
Number of EC2 instances (1), Number of EIPs per instance (1)
Number of Network Load Balancers (1), Processed bytes per NLB for TCP (1000 GB per month)
Number of Web Access Control Lists (Web ACLs) utilized (10 per month), Number of Rules added per Web ACL (10 per month)
S3 Standard storage (50 GB per month)
DT Inbound: Not selected (0 TB per month), DT Outbound: Internet (500 GB per month)
DT Inbound: Not selected (0 TB per month), DT Outbound: Internet (2 TB per month), DT Outbound: All other regions (2 TB pe
DT Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
DT Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
T Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
DT Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
T Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)

t storage (5 GB), Data Written (5 GB)


Estimate summary
Upfront cost Monthly cost
0 3136.826

Detailed Estimate
Group hierarchy Region
B2B API golang Asia Pacific (Singapore)
B2B Portal Asia Pacific (Singapore)
B2B Agency API golang Asia Pacific (Singapore)
Flexchannel service job golang Asia Pacific (Singapore)
Flexchannel backend golang Flexchannel CMS php Asia Pacific (Singapore)
MongoDB Elasticsearch Asia Pacific (Singapore)
EKS Asia Pacific (Singapore)
ECR Asia Pacific (Singapore)
KAFKA Asia Pacific (Singapore)
Amazon RDS for PostgreSQL Asia Pacific (Singapore)
Amazon MemoryDB for Redis Asia Pacific (Singapore)
EIP Asia Pacific (Singapore)
NLB Asia Pacific (Singapore)
WAF Asia Pacific (Singapore)
S3 Standard Asia Pacific (Singapore)
S3 Standard Data Transfer Asia Pacific (Singapore)
AWS Data Transfer Asia Pacific (Singapore)

Acknowledgement
* AWS Pricing Calculator provides only an estimate of your AWS fees and doesn't include any taxes that might apply. Your actu
Total 12 months cost Currency
37641.91 USD
* Includes upfront cost

Description Service
B2B API golang Amazon EC2
B2B Portal Amazon EC2
B2B Agency API golang Amazon EC2
Flexchannel service job golang Amazon EC2
Flexchannel backend golang Flexchannel CMS phpAmazon EC2
MongoDB Elasticsearch Amazon EC2
Amazon EKS
Storage docker images Amazon Elastic Container Registry
Amazon Managed Streaming for Apache Kafka (MSK)
Amazon RDS for PostgreSQL
Amazon MemoryDB for Redis
Amazon Elastic IP
Network Load Balancer
AWS Web Application Firewall (WAF)
S3 Standard
Data Transfer
AWS Data Transfer

sn't include any taxes that might apply. Your actual fees depend on a variety of factors, including your actual usage of AWS services.
Upfront Monthly First 12 moCurrency
0 178.896 2146.75 USD
0 84.288 1011.46 USD
0 178.896 2146.75 USD
0 157.776 1893.31 USD
0 178.896 2146.75 USD
0 169.776 2037.31 USD
0 73 876 USD
0 2 24 USD
0 86.788 1041.46 USD
0 441.77 5301.24 USD
0 211.01 2532.12 USD
0 0 0 USD
0 24.4 292.8 USD
0 150 1800 USD
0 1.25 15 USD
0 122.88 1474.56 USD
0 1075.2 12902.4 USD

sage of AWS services.


Configuration summary
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 1), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 2), Advance EC2 instance (
Tenancy (Shared Instances), Operating system (Linux), Workload (Consistent, Number of instances: 1), Advance EC2 instance (
Number of EKS Clusters (1)
Amount of data stored (20 GB per month)
Storage per Broker (10 GB), DT Inbound: Not selected (0 TB per month), DT Outbound: Not selected (0 TB per month), DT Intra
Storage volume (General Purpose SSD (gp2)), Storage amount (100 GB), Nodes (2), Instance Type (db.t3.medium), Utilization (
Nodes (0), Instance type (db.r6gd.2xlarge), Utilization (On-Demand only) (100 %Utilized/Month), Pricing strategy (OnDemand)
Number of EC2 instances (1), Number of EIPs per instance (1)
Number of Network Load Balancers (1), Processed bytes per NLB for TCP (1000 GB per month)
Number of Web Access Control Lists (Web ACLs) utilized (10 per month), Number of Rules added per Web ACL (10 per month)
S3 Standard storage (50 GB per month)
DT Inbound: Not selected (0 TB per month), DT Outbound: Internet (1 TB per month)
DT Inbound: Not selected (0 TB per month), DT Outbound: Internet (5 TB per month), DT Outbound: All other regions (5 TB pe
T Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
DT Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
T Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
T Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
T Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)
DT Outbound: Not selected (0 TB per month), DT Intra-Region: (0 TB per month)

Written (10 GB), Snapshot storage (10 GB)


update README.md / repository
1. dependencies (versions, coding languages)
Type 2. port of services
Recommend
3. expose api to health check
Log console log, write
4. command down
to build, runcritical logs to alert
Guide to deploy 5. the example of success log
No Service Instance

I Partner
FE
1 partner-portal n
BE
1 partner-api n
2 partner-agency-api n

II EFC
FE
1 efc-cms n
BE
1 efc-service-job 1
2 efc-api n

III Database-Queue-Cache
1 postgres db cluster
2 redis cluster
3 kafka cluster
4 mogodb cluster
5 elasticsearch cluster
6 grafana-loki 1

IV Others
1 eks
2 ecr
3 s3
4 load blancing
5 waf
6 Thực hiện add cảnh báo, log vào hệ thống giám sát
7 Pipline CI/CD (gitlab-runner, hook trigger)

IV DNS (CXNAME)

stag
1 partner-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
2 efc-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
3 efc-api-staging.bambooairways.com/b2b a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
4 efc-api-staging.bambooairways.com/tam a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
5 efc-api-staging.bambooairways.com/grpc-combo a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
6 efc-api-staging.bambooairways.com/cms-foc a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
7 efc-api-staging.bambooairways.com/efc-foc a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
8 efc-api-staging.bambooairways.com/efc-category a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
9 efc-api-staging.bambooairways.com/grpc-foc a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
10 efc-monitoring-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
11 efc-elasticsearch-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
12 efc-kibana-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
13 efc-kafkaui-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
14 efc-monitoring-stag.bambooairways.com/ci a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
15 efc-topup-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
16 efc-agency-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
17 efc-cms-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
18 efc-cms-stag.bambooairways.com/tam a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
19 efc-paylater-stag.bambooairways.com a7dd73f07b00a4b50811148d6090033d-ce60ce9452e
Coding Language Effort Expected DueDate Time Line Process

node 18 2

go 1.17 3
go 1.17 3

php 2

go 1.20 3
go 1.20 3

done
2 done
2 done
2 done
3 done
3 done
1

4 done
0.5 done
0.5 done
0.5 done
8
16

f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
f07b00a4b50811148d6090033d-ce60ce9452e2e737.elb.ap-southeast-1.amazonaws.com done
NOTE

efc-stag.cm6cygwpu7o4.ap-southeast-1.rds.amazonaws.com:5432
clustercfg.efc-stag-redis.4bdxvt.memorydb.ap-southeast-1.amazonaws.com:6379
b-1.efcstag.s3fi7p.c3.kafka.ap-southeast-1.amazonaws.com:9092,b-2.efcstag.s3fi7p.c3.kafka.ap-southeast-
1.amazonaws.com:9092
efc-stag-mongodb-headless:27017
http://efc-logging-stag.bambooairways.com/elasticsearch

235034247648.dkr.ecr.ap-southeast-1.amazonaws.com/efc-stag
efc-stag.s3.amazonaws.com | id=AKIATNOJCAHQK2SHKYXR | secret=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

b2b-frontend
efc-php/efc.bambooairways.com
hub-b2b
hub-tam
combo-b2b-portal
cms-foc
efc-service-foc
efc-service-category
grpc-foc
Grafna: admin / BaVD@shb0ard~!#
ElasticSearch: elastic / fV2yJ0mC2hQ6fH0o
Kibana: elastic / fV2yJ0mC2hQ6fH0o
Kafka UI: admin / BavKafk@UI#2023
Jenkins: developer / yR1gB3aJ9dQ7bB0z
Flex Channel Topup
efc-agency
cms-system
cms-tam
efc-paylater.bambooairways.com
GIT_x001D_LAB REPO
No Service Instance Coding Language

I Partner
FE
1 partner-portal n vujs
BE
1 partner-api n go 1.17
2 partner-agency-api n go 1.17

II EFC
FE
1 efc-cms n php
BE
1 efc-service-job 1 go 1.20
2 efc-api n go 1.20

III Database-Queue-Cache
1 postgres db cluster
2 redis cluster
3 kafka cluster
4 mogodb cluster
5 elasticsearch cluster
6 grafana-loki 1

IV Others
1 AWS S3
2 Load Balancing
3 WAF
4 Thực hiện add cảnh báo, log vào hệ thống giám sát
5 Bàn giao hệ thống: vận hành, monitor, xử lý sự cố.

IV DNS (CXNAME)

staging
1 partner.bambooairways.com
2 efc.bambooairways.com
3 efc-api.bambooairways.com
4 efc-monitoring.bambooairways.com
5 efc-elasticsearch.bambooairways.com
6 efc-kibana.bambooairways.com
7 efc-kafkaui.bambooairways.com
Effort Expected DueDate Time Line Process

3
3

3
3

2
2
2
3
3
1

0.5
0.5
4
8
16
NOTE

Tài liệu vận hành và quản trị


branch environment
develop staging
master pre-prod
tag on master prod
#Deploy stag env
terraform workspace select stag
terraform apply -target=aws_security_group.allow-access-processing-subnet -target=aws_security_group.allow-access-databa
terraform plan -out tf_stag_plan -var-file stag_variables.tfvars
terraform apply tf_stag_plan

#Deploy prod env


terraform workspace select prod
terraform apply -target=aws_security_group.allow-access-processing-subnet -target=aws_security_group.allow-access-databa
terraform plan -out tf_prod_plan -var-file stag_variables.tfvars
terraform apply tf_prod_plan
ity_group.allow-access-database-subnet -target=aws_key_pair.devops -var-file stag_variables.tfvars

ity_group.allow-access-database-subnet -target=aws_key_pair.devops -var-file prod_variables.tfvars

You might also like