# Doubt in web space Allocation

**URL:** <https://www.ruby-forum.com/t/doubt-in-web-space-allocation/151526>\
**Category:** Rails\
**Created:** [October 22, 2008, 1:34pm UTC](https://www.ruby-forum.com/t/doubt-in-web-space-allocation/151526 "2008-10-22T13:34:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dark2imperial](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dark2imperial](https://www.ruby-forum.com/u/dark2imperial)\
**Post date:** [October 22, 2008, 1:34pm UTC](https://www.ruby-forum.com/t/doubt-in-web-space-allocation/151526/1 "2008-10-22T13:34:45Z")

</div>

Suppose there is a social networking site for uploading and sharing  
videos developed in rails. It has subscription packages like Free - 1  
gb, Pro - 5 gb and Plus - 10 gb. How do they allocate the space for a  
particular user for a particular subscription package automatically?

Thank you

---

<div class="post-metadata">

**Author:** ![dark2imperial](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dark2imperial](https://www.ruby-forum.com/u/dark2imperial)\
**Post date:** [October 22, 2008, 2:56pm UTC](https://www.ruby-forum.com/t/doubt-in-web-space-allocation/151526/2 "2008-10-22T14:56:42Z")

</div>

They probably don’t so much pre-allocate space as monitor how much a  
user is using.

Putting accounts into size bins lets the vendor determine their capacity  
measures, and when it’s time to expand their back-end storage to ensure  
space availability.

---

<div class="post-metadata">

**Author:** ![dark2imperial](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dark2imperial](https://www.ruby-forum.com/u/dark2imperial)\
**Post date:** [October 22, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/doubt-in-web-space-allocation/151526/3 "2008-10-22T15:09:24Z")

</div>

Ar Chron wrote:

> They probably don’t so much pre-allocate space as monitor how much a  
> user is using.
> 
> ## Putting accounts into size bins lets the vendor determine their capacity measures, and when it’s time to expand their back-end storage to ensure space availability.
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Thank you for your reply. Are there any methods to monitor the web  
space usage through Rails using some gems or plugins?

---

<div class="post-metadata">

**Author:** ![dark2imperial](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/3da27b/32.png) [@dark2imperial](https://www.ruby-forum.com/u/dark2imperial)\
**Post date:** [October 22, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/doubt-in-web-space-allocation/151526/4 "2008-10-22T15:30:53Z")

</div>

dark2imperial wrote:

> Thank you for your reply. Are there any methods to monitor the web  
> space usage through Rails using some gems or plugins?

Not that I know of, but I’d think that you really only need a space\_used  
attribute on the account, and methods to increment or decrement the  
account’s usage on the upload or deletion of a file/video.
