NoSQL: Calculating the Cost of Storing PHP Sessions Using Amazon DynamoDB

| | bookmark | email

Calculating the Cost of Storing PHP Sessions Using Amazon DynamoDB

Aside from nominal data storage and data transfer fees, the costs associated with using Amazon DynamoDB are calculated based on provisioned throughput capacity and item size (see the Amazon DynamoDB pricing details). Throughput is measured in units of Read Capacity and Write Capacity. Ultimately, the throughput and costs required for your sessions table is going to be based on your website traffic, but the following is a list of the capacity units required for each session-related operation with the assumption that your sessions are less than 1KB in size: Reading via session_start() With locking enabled: 1 unit of Write Capacity + 1 unit of Write Capacity for each time it must retry acquiring the lock With locking disabed: 1 unit of Read Capacity (or 0.5 units of Read Capacity if consistent reads are disabled) Writing via session_write_close() : 1 unit of Write Capacity Deleting via session_destroy() : 1 unit of Write Capacity Garbage Collecting via DyanamoDBSessionHandler::garbage_collect() : 0.5 units of Read Capacity per KB of data in the sessions table + 1 unit of Write Capacity per expired item

tags:dynamodb,amazon,php

via NoSQL databases