iphoneiosamazon-web-servicesamazon-s3amazon-ec2

Architecture of iphone app with amazon web service backend


I am creating an iPhone app that will connect to a web server for login and for viewing videos.
Here is the workflow for sending a video to another user using the app: The iPhone app will connect to an ec2 instance (multiple instances can be launched and destroyed based on traffic) where a PHP script will get information about the video (video sender, video recipient, assign video unique id, etc.) and store this information in an amazon RDS instance. The actual video will then be stored in Amazon S3 with the same unique ID that was stored in the RDS.

Is this a good way to go about this or would another way be better?


Solution

  • If I understood your application will be uploading and streaming videos.

    I would start with 3 layers, Web, App and DB. In the web and app layer, one ELB and 1+N instances behind it using Auto Scaling. In the DB layer RDS is fine, but depending on the load I would migrate to some flavor of NoSql (DynamoDB, MongoDB, etc). For serving the content I would definitely use CloudFront as CDN to provide a better user experience on the video streaming.

    Anyway, I suggest you to take a look at the AWS reference diagrams (http://aws.amazon.com/architecture/), to begin, more specifically the Web Application Hosting and Content and Media serving diagram.

    Hope this helps.