MyBB Community Forums
Question about Architecture - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: Installation and Upgrades Support (https://community.mybb.com/forum-182.html)
+--- Thread: Question about Architecture (/thread-188867.html)

Pages: 1 2 3


Question about Architecture - Misinformed - 2016-02-09

I am trying to create a scalable architecture with myBB and was wondering if it can actually perform in an auto scaling solution.  I am using AWS and created an Autoscale group with the webserver and mybb installed and preconfigured.  I have one RDS of MySQL on the backend replicated to another AZ with both webserver in separate AZ's sharing the same DB.  The are fronted by a public Load balancer where are the traffic flows and is distributed to each web server.  I am getting bad pages, like half shown forums and such (which worked fine in the image I created before making a template and adding to the autoscale group) and the loading sometimes will time out.

If it is a simple, "mybb will not work in that architecture" then fine.  I would just like to know before trying to troubleshoot.

Thanks,

Misinformed.

Ok, I think I am an idiot and not sure this will solve the ultimate question of will mybb scale but I just realized when configuring myBB I added the dns of my image instead of the Load balancer dns because I am not using my registered domain yet. Ugh. Will report back.


RE: Question about Architecture - StefanT - 2016-02-09

Please keep in mind you need to synchronize uploads (attachments and avatar) across your webservers.


RE: Question about Architecture - Misinformed - 2016-02-09

(2016-02-09, 04:34 PM)StefanT Wrote: Please keep in mind you need to synchronize uploads (attachments and avatar) across our webservers.

Ugh.  That is it.  I knew there was something that wasn't in the database.  

Can I point those to an S3 bucket instead or is it hardcoded to those locations?


RE: Question about Architecture - Euan T - 2016-02-09

It is possible to point them to a bucket, but you will need to write a plugin (unless you can mount the bucket as a network share - I'm not sure if that's possible). I've written such a plugin in the past. MyBB has built in support for CDNs that act as Pull Zones (so the opposite of S3 unfortunately).


RE: Question about Architecture - Misinformed - 2016-02-10

The DNS was the issue and everything came out clean. My only issue is not with the above statement on synchronizing attachments and avatars. I am not aware of a way to use S3 buckets like network shares so I need another option.


RE: Question about Architecture - Euan T - 2016-02-10

In that case you'd need a plugin hooking into the hook "copy_file_to_cdn_end".


RE: Question about Architecture - Cameron:D - 2016-02-11

A plugin is probably your best option, though there is s3fs which mounts S3 buckets through FUSE, however I feel that will get costly pretty quick.

Amazon also have a test/preview service, EFS, which supports shared storage between instances (Over NFSv4, so I guess you could also do something similar yourself - have a single server storing avatars and such and just mount the folder to each instance).


RE: Question about Architecture - Misinformed - 2016-02-11

(2016-02-11, 11:01 AM)Cameron:D Wrote: A plugin is probably your best option, though there is s3fs which mounts S3 buckets through FUSE, however I feel that will get costly pretty quick.

Amazon also have a test/preview service, EFS, which supports shared storage between instances (Over NFSv4, so I guess you could also do something similar yourself - have a single server storing avatars and such and just mount the folder to each instance).

This is exactly what I was just looking into but don't understand how it can get "quite expensive" as S3 storage is really cheap.  Really cheap.  Especially since avatars and attachments are not enormous files and would not take up much space.  And at $0.029 per GB it might not be to bad unless it starts to grow like crazy which I don't expect.  I will keep an eye on it if I decide to go that route.

I also am looking at lsyncd and possibly glusterfs as solutions but have heard glusterfs doesn't like autoscaling groups so that is probably out.

Thanks.

For 1TB of storage and 1000 PUT/COPY/POST/LIST Requests and 1000 GET and Other Requests: it is $29/month. No way I use that much. for 100GB and the same it is $2.85/month.


RE: Question about Architecture - Cameron:D - 2016-02-14

s3fs would likely get expensive because it will continually send GET requests to s3 to retrieve info on each avatar (10 avatars per page means 10 GETs to s3).

I'm not that familiar with S3s pricing but its just something that occurred to me.


RE: Question about Architecture - Misinformed - 2016-02-15

For 10,000 requests it is 0.04. It is a good point to bring up but at that rate it is doable.

Just for knowledge, 10 million requests is $5/month. I don't expect to come near that but I hope it becomes an issue. Wink

Thanks for your feedback.

(2016-02-11, 11:01 AM)Cameron:D Wrote: Amazon also have a test/preview service, EFS, which supports shared storage between instances (Over NFSv4, so I guess you could also do something similar yourself - have a single server storing avatars and such and just mount the folder to each instance).

This would also be a good option but I heard it is stuck in Beta because they are having issues.  Sad