Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 23, 2013 3:14 am 
Offline
Senior Newbie

Joined: Tue May 14, 2013 6:25 pm
Posts: 14
I currently have an application running on a single Linode 1GB. This is a photo sharing application (think Flickr i guess), so action involves serving static images, uploading images to the server etc. The app is normally pretty fast... until other users start uploading lots of photos.

During photo uploading, the application consumes a lot of CPU power as it uses ImageMagick to generate different sizes and Jpegoptim for compression of each photo. The site becomes unusably slow when 3 or 4 users upload images at the same time, and my server CPU usage goes way up. This basically renders the client facing side of the app unusable as well. Upgrading to a higher Linode plan is probably not the long term solution.

Off my mind, I am thinking of running another Linode dedicated to image processing. After processing, I can FTP the files to back to the client facing app server. Then as the app grows, I can add more servers along with a load balancer for dedicated image processing. As for storage, I am guessing I will eventually have to move onto something like Amazon S3.

Is this a feasible approach? Would upgrading to a higher linode plan solve this issue in the short term? Can someone point in the right direction in terms of architecture for scaling this out correctly? for both short term relieve and long term?

Thanks in advance.


Top
   
PostPosted: Thu May 23, 2013 5:19 am 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Try ZeroMQ (www.zeromq.org). You can have any number of processing nodes that listen to a "message" (image processing task) from any number of front servers. Think master-master db replication only with messages. The messages are basically strings so you can encode them whatever you like, eg. a json string with processing params and the image itself hex or base64 encoded. Or whatever.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group