Skalieren von Rails Anwendungen mit Amazon S3 und EC2

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + guest0c4da0 guest0c4da0 3 years ago
    Very good slides, they help ruby developers skaling their applications easily!
Post a comment
Embed Video
Edit your comment Cancel

4 Favorites

Skalieren von Rails Anwendungen mit Amazon S3 und EC2 - Presentation Transcript

  1. Skalieren von Rails Anwendungen mit Amazon S3 und EC2 Jonathan Weiss, Peritor Wissensmanagement GmbH 22.06.2007, Rails Konferenz
  2. Ausgangslage Eine Maschine: • Apache • Ruby / Rails • MySQL 2
  3. Worst Case Popularität 3
  4. Steiniger Weg 4
  5. Problem: Backup • Hochverfügbar • Redundant • Große Datenmengen 5
  6. Problem: File System • Wichtige Dateien müssen allen Systemen zugänglich sein • NFS / Samba unpraktikable Lösungen 6
  7. Problem: Plötzliche Lastspitzen 7
  8. Problem: Ungleichmäßige Belastung 8
  9. Don‘t reinvent the wheel! 9
  10. Amazon Web Services Simple Storage Service - S3 Elastic Compute Cloud - EC2 E-Commerce S.. Redundanter Speicherplatz Virtueller Server pro Stunde ……. $0,15 per GB Speicherplatz $0,10 pro CPU Stunde $0,10 - $0,20 pro GB Traffic $0,10 - $0,20 pro GB Traffic 10
  11. S3 - Simple Storage Service • Beliebig viel redundanter, hochverfügbarer Speicherplatz • max. 5 GB pro Datei • Organisiert in „Buckets“ • Upload über Web Service API • Abruf über • Web Service • HTTP / HTTPS • BitTorrent 11
  12. S3 - Buckets S3 • Unique über ganz S3 • Enthalten beliebig MyBucket_name www.peritor.com viele Key-Value-Metadata Tupel foto_5.jpg /site/screen.css • Enthalten keine Buckets! /backups/januar.tgz /site/script.js • Key kann „/“ enthalten /fotos/2007/001.png FreeBSD-6.2.iso 12
  13. S3 mit AWS::S3 Upload Download 13
  14. EC2 - Elastic Compute Cloud • XEN basiert • (Beliebig) viele virtuelle Server steuerbar über Web Service • 1,7 GHz • 1,75 GB RAM • 160 GB lokaler Speicherplatz (nicht persistent!) • Einsatz der Linux Distribution der Wahl (Linux 2.6.16), Verwaltung der Amazon Machine Images (AMI) auf S3 • ACLs regeln Zugriff auf Hosts / Ports 14
  15. EC2 Tools Verfügbare Images auflisten Neue Instanz starten Einloggen per SSH Instanz beenden 15
  16. Und jetzt? Wie löse ich meine Probleme damit? 16
  17. S3 - Backup • s3sync.rb • S3Browser • Brackup • Firefox S3 Organizer extension • Jungle Disk •… • S3 FUSE • s3DAV • Duplicity 17
  18. s3sync.rb Backup Restore 18
  19. S3 als asset host 19
  20. S3 als asset host Setup DNS Setup Rails Konfiguration 20
  21. S3 als asset host welcome.rhtml Template Output 21
  22. S3 - User Data Speicher 22
  23. attachment_fu Rails plugin Setup 23
  24. attachment_fu Rails plugin Upload Download 24
  25. On-Demand Computing mit EC2 Zeitgesteuert, z.B. mit cron 25
  26. On-Demand Computing mit EC2 Lastgesteuert, z.B. mit Monit 26
  27. On-Demand Computing mit EC2 27
  28. Load Balancer / Proxy Am Beispiel mod_proxy_blancer: • Ansprechen von multiplen Backend- Servern (Mongrel) • Zentrale Proxy/Load-Balancer Konfiguration mit Wissen über Nodes • Typischerweise Neustart des Proxy bei Veränderung der Backend-Server 28
  29. Swiftiply Swiftiply Proxy: • Multiple Backend-Clients verbinden sich persistent zum Backendport • Proxy nimmt Anfragen über Clusterport entgegen und verteilt sie auf verbundene Clients Keine Re-Konfiguration nötig 29
  30. Swiftiply Proxy Installation Konfiguration Start 30
  31. Swiftiplied Mongrel • Gem plugin um Mongrel zu patchen • Wandelt Mongrel in Swiftiply-Client um • Noch experimentell Start oder 31
  32. EC2 on Demand vor Swiftiply 32
  33. EC2 on Demand mit Swiftiply 33
  34. EC2 on Demand mit Swiftiply 34
  35. Ressourcen • Amazon Web Services http://aws.amazon.com • Swiftiply http://swiftiply.swiftcore.org • Attachment_fu http://svn.techno-weenie.net/projects/plugins/attachment_fu/ • Elastic Rails http://www.elasticrails.com • Capazon http://capazon.rubyforge.org • RightScale http://www.rightscale.com • WeoCEO http://weoceo.weogeo.com/ 35
  36. Peritor Wissensmanagement GmbH Lenbachstraße 2 12157 Berlin Internet: www.peritor.com Telefon: +49 (0)30 69 40 11 94 E-Mail: kontakt@peritor.com Telefax: +49 (0)30 69 40 11 95 © Peritor Wissensmanagement GmbH - Alle Rechte vorbehalten 36
  37. jobs@peritor.com 37

+ Jonathan WeissJonathan Weiss, 3 years ago

custom

3091 views, 4 favs, 2 embeds more stats

A talk on how to leverage Amazon S3 and EC2 for you more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 3091
    • 2967 on SlideShare
    • 124 from embeds
  • Comments 1
  • Favorites 4
  • Downloads 3
Most viewed embeds
  • 122 views on http://blog.innerewut.de
  • 2 views on http://www.planetrubyonrails.org

more

All embeds
  • 122 views on http://blog.innerewut.de
  • 2 views on http://www.planetrubyonrails.org

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories