# Average 'payload' size per pageview (to calculate bandwidth needs)

(mountain) #1

I, in my constant yak shaving, have mentally conjured a hypothetical formula to ballpark a possible bandwidth figure. This is so I can anticipate bandwidth costs. For me, it’s better to get some idea of what I may be up against than nothing at all.

To use the formula, one needs to find the median of a single Discourse instance’s average payload size. Then use it to divide the bandwidth one is allowed each month by one’s VPS provider. The solution shows how many pageloads/payloads would have to happen to reach the bandwidth cap.

x = bandwidth cap
z = average number of views/payloads to reach the bandwidth cap

x/y = z

(I am absolutely terrible at math but I can write these out since it’s basic problem solving for me. If I’m wrong with the stuff above then please correct.)

My question is how would one go about determining the average size of a payload? Furthermore, what determines a payload for Discourse?

I know the JavaScript framework needs to be loaded first. After that it’s only calling things from the database then serve onto the JavaScript.

I also have tried finding through google ways to determine bandwidth size needs. I haven’t found much; this is my concrete way of getting a solid ballpark figure so I have a simple idea of what to possibly expect.

(Jeff Atwood) #2

Considering everything is compressed text why bother? It is all impossibly tiny compared to a 50kb or 500kb image file. Wrong question, ask how many image files you will be serving and how often…

(mountain) #3

If that’s the case then the only thing to do is figure out the average number of images per topic and add up.

(Jeff Atwood) #4

It would only be relevant if you never served images. And it would be very small, you would have to be absolutely enormous to hit traffic limits on pure text alone.