---
# System prepended metadata

title: new recording license cost

---

# new recording license cost
## define
* 30 day per month

## case 1
### 1ch 1Mbps storage 7 day recycle
* 3PG: 1 Mb/sec * 24 hr/day = 3600 * 24 Mb/day = 10800 MB/day
* DB: 3600 3gp, 10 interval ==> 400 KB/day = 0.390625 MB/day
* total: 10800 MB/day + 0.390625 MB/day = 10800.390625 MB/day
* week: 10800.390625 MB/day * 7 day = 75602.734375 MB = 73.83079 GB
> Storage: 73.83079 GB --- 72.099686 TB

### 1ch 1Mbps recording 1 month
* daily files: 450 MB/hr / 3 MB/file * 24 hr/day = 3600 files/day
* db and mdeia: 3600 file/day * 30 day/month * 2 PUT/file = 216000 PUT/month
* DB: 400 KB/file * 3600 file/day / 2 = 703.125 MB/day
    * button * hight / 2 to calculate trianle total size
* 10800 MB/day + 703.125 MB/day = 11503.125 MB/day = 11.233552
* month: 11503.125 MB/day * 30 day/month = 345093.75 MB/month = 337.005615
> PUT request : 216000 req/month --- 216000000 PUT/month
> data transfer in: 337.005615 GB/month --- 329.107045 TB/month

### playback total 1 GB per year
* year size: 1GB = 1024 MB = 8192 Mb
* files size: 8192 Mb / 1 Mbps = 8192 sec = 2.x hr
* files count: 1024 MB/year / 3 MB/file * 2 GET/file / 12 month/year = 58.88888 GET/month
* data: 1 GB/year / 12 month/year = 1024 MB/year / 12 month/year = 85.333 MB/month
> GET request: 58.88888 req/month --- 58888.88 GET/month
> data transfer out: 85.333 MB/month --- 83.330078 GB/month

### S3 + EC2 per 1000 people per month
* Storage: 72.099686 TB
* PUT request : 216000000 PUT/month
* GET request: 58888.88 GET/month
* data transfer in: 329.107045 TB/month
* data transfer out: 83.330078 GB/month = 0.081377 TB/month

### ELB - 1000 user
#### Classic
* 1 CLB
* 329.107045 TB/month + 0.081377 TB/month = 329.188422 TB/month
* https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-7f386ac6f8940a11408e599ca83457511198d1a5&v=ver20190627vO&s=ELB
    > 2995.45 USD

#### Application
* files: 2 req/file * 1000 people * 450 MB/hr / 3 MB/file / 3600 sec/hr = 83.333333
* GET + PUT: 216058888.88 con/month / 2592000 sec/month = 83.356052 con/sec
> con/sec per ALB: 84
> Con duration: 2 sec
> Req/Sec per ALB: 167
> Data for EC2: 330 TB/month
> Rule/req: 6
* https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-76983c1e9920f45e1876345ee2112d121d95c063&v=ver20190627vO&s=ELB
    > 2993.28 USD

#### Classic - only playback
* https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-f2ad64093d17b2783eacd24c0679f411b0420cdc&v=ver20190627vO&s=ELB
    > 120.45 USD

#### Application - only playback
* request: 58888.88 GET/month => 58888.88 / 2592000 sec/month = 0.022 < 1
> con/sec per ALB: 1
> Con duration: 2 sec
> Req/Sec per ALB: 2
> Data for EC2: 84 TB/month
> Rule/req: 6
* https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-78cbca932692e139388352948286ccd8f7f50957&v=ver20190627vO&s=ELB
    > 118.5 USD

### SUM - 1000 user total cost pre month
* TBD

## case 2
### 1ch 1Mbps storage 30 day recycle
* 3PG: 1 Mb/sec * 24 hr/day = 3600 * 24 Mb/day = 10800 MB/day
* DB: 3600 3gp, 10 interval ==> 400 KB/day = 0.390625 MB/day
* total: 10800 MB/day + 0.390625 MB/day = 10800.390625 MB/day
* month: 10800.390625 MB/day * 30 day = 324011.71875 MB = 316.417694 GB
> Storage: 316.417694 GB --- 309.001654 TB

### 1ch 1Mbps recording 1 month
* the same as case 1 

### playback total 1 GB per year
* the same as case 1 

### S3 + EC2 per 1000 people per month
* Storage: 309.001654 TB
* PUT request : 216000000 PUT/month
* GET request: 58888.88 GET/month
* data transfer in: 330 TB/month
* data transfer out: 83.330078 GB/month = 0.081377 TB/month

### SUM - 1000 user total cost pre month
#### impl 1:
* record to S3 through CLB and EC2
* playback from S3 through CLB and EC2:
    * https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-091029be42dfd6d921b9a218ff4334f53d085b4a&v=ver20190701sN
    * 11492.62
#### impl 2:
* record to S3
* playback from S3 through CLB and EC2:
    * https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-7f031c5c855a0ba31b8206ace76f6ac795598d93&v=ver20190701sN
    * 8789.94
#### impl 3:
* record to S3
* playback from S3 through ALB and EC2:
    * https://calculator.s3.amazonaws.com/index.html#r=NRT&key=files/calc-97dc3c1533f368e6fdc0887abb4d06f48d4211a0&v=ver20190701sN
    * 8787.99
