O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Amazon Web Services lection 6

193 visualizações

Publicada em

Architecture patterns

Publicada em: Engenharia
  • Seja o primeiro a comentar

Amazon Web Services lection 6

  1. 1. AWS: architecture patterns Dmitriy Beseda Binary Studio 2016
  2. 2. There are lots of metrics to build architecture ● Hardware ● Availability ● Performance ● Data transferring ● Database interaction ● Consistency ● Partitioning ● Security
  3. 3. Amazon Web Services 1. There are ~63 services 2. According to selected region pricing and available services can different
  4. 4. Patterns 48+ patterns to implement apps
  5. 5. Snapshot
  6. 6. Snapshot Benefits: ● Limitless cloud storage ● Automating process via API ● S3 as a storage ● Not only data but also OS with settings can be backed up Cautions: ● You must maintain data consistency when taking snapshots
  7. 7. Stamp Pattern
  8. 8. Stamp Pattern Benefits: ● You can easily create as many EC2 instances with equal characteristics as you want. ● You can share AMI to give ability other users to launch such servers Cautions: ● Hard to upgrade hardware characteristics. ● If you need to launch path - you should do this to all AMIs
  9. 9. Scale up (vertical)
  10. 10. Scale up (vertical) Benefits: ● It is easier to predict necessary resources, because you can upgrade them in few clicks. ● You pay only what you use Cautions: ● 30 seconds to few minutes latency during restarting new instance
  11. 11. Scale out
  12. 12. Scale out Benefits: ● Easy to increase performance automatically and manually ● Pay only for what you use Cautions ● Scale group is equal by characteristics ● In case when lots of instances are required - not all can be launched immediately ● Scale out is pretty difficult
  13. 13. On-demand disk size
  14. 14. On demand disk size Benefits: ● You can easily increase/decrease your disk size ● Striping can improve I/O performance ● Secure disk space Cautions: ● Securing costs for large amount of space (100Gb) ● Max single disk limit - 1Tb
  15. 15. Multi-Server Pattern
  16. 16. Multi-Server Pattern Benefits: ● Redundancy provides durability ● Multi region running ● Automation of running new and turning of unnecessary instances ● Ability to spare internet gateways Cautions: ● Cost (lots of instances can cost more than powerful one) ● Sharing data and synchronization are difficult (db, files, patches, upgrades)
  17. 17. Multi-Datacenter
  18. 18. Multi-Datacenter Benefits: ● You can structure a system that will continue to provide service even when there is a major failure on the data center level (earthquake and other natural disaster) ● High speed communication line between neighbors data-centers ● In AWS there are neither initial setup fees nor monthly use fees for each individual AZ, there is no difference in your cost regardless of whether you use a single AZ or multiple AZs
  19. 19. Multi-Datacenter Cautions: ● For Dbs master can be only in one AZ ● During massive data transferring bottleneck problem is possible ● Elastic Load Balancing (ELB) does not support redundant structures that span regions ● To make maximum fault tolerance it is necessary to launch instances in all AZs, which is expensive
  20. 20. Floating IP Pattern
  21. 21. Floating IP Pattern Benefits: ● You can swap servers by merely reassigning the EIP, unaffected by the TTL of the DNS ● Because you can apply EIPs across different Availability Zones (AZs), even if there were a failure on an AZ level, you can reassign the EIP to a server in a different AZ Cautions: ● Switching an EIP normally takes several seconds ● When you make a Secure Shell (SSH) connection to a new instance behind an
  22. 22. Deep Health Check
  23. 23. Deep Health Check Benefits: ● This makes it possible for you to check all of the servers required for system operation (even with details) Cautions: ● If there is a large number of servers, then the health checks themselves will contribute to the traffic, so you must carefully consider the timing for the health checks ● In case with DBs health check will only show a problem which can already set all service down
  24. 24. Web Storage (Static)
  25. 25. Web Storage (Static) Benefits: ● The use of S3 eliminates the need to worry about network loads and data capacity ● S3 performs backups in at least three different datacenters, and thus has extremely high durability ● Because a URL is issued for each content object, the files can be used for a broad range of purposes, such as file sharing, merely through placement on S3 Cautions: ● Set up correct paths
  26. 26. Private Distribution Pattern
  27. 27. Private Distribution Pattern Benefits: ● This enables delivery of private content through time-limited use by specified users only ● Because the actual content download is performed directly from S3 (rather than passing through an EC2 instance), the properties of S3 of being robust to load and to failures are directly applicable Cautions: ● You must provide a validation system and a server for issuing time-limited URLs
  28. 28. Cache Distribution
  29. 29. Cache Distribution Benefits: ● This makes it possible for you to provide a better user experience to users in geographically distant places ● This lets you distribute the file download processes, which is useful in load distribution as well ● You can also use S3 directly as the origin, using it as an origin server Cautions: ● Data can be old for some period time because of cache
  30. 30. Clone Server
  31. 31. Clone Server Benefits: ● This lets you perform load distribution through Scale Out easily, without modifying the existing system Cautions: ● The master EC2 instance becomes a single point of failure ● If DB runs on master - don’t run it on cloned volumes ● File uploading should be performed only by master instance
  32. 32. Other solutions for Dynamic content ● NFS Share or replicating ● State sharing (locally stateless) ● Proxy patterns
  33. 33. Relational DB Replication patterns
  34. 34. Relational DB Replication patterns Benefits: ● This makes it possible to continue the operations without loss of data, even in the case of a disaster or failure ● Switching the access destination to the replicated database lets you apply a patch to a database without shutting down the system ● If the load in reading from a database is high, you can use this to distribute that load Cautions: ● While this makes fail-over to the slave possible when a failure has occurred in
  35. 35. In-memory DB
  36. 36. In-memory DB Benefits: ● You can use high-speed memory for the cache to reduce the load of reading from the database, improving overall system performance ● You can use ElastiCache to streamline the operation, and ElastiCache is robust to failures Cautions: ● Using the cache may require you to modify the program that accesses the database ● You should consider the trade-offs when caching query results
  37. 37. RDS Sharding
  38. 38. Benefits: ● You can achieve higher availability through using RDSs as backend databases for sharding (in Multi-AZ) ● You can distribute the backend databases to multiple regions to provide improved performance in various regions of a worldwide system Cautions: ● When the backend databases are distributed to multiple regions, encryption may be required when communicating with the sharding software
  39. 39. OnDemand NAT Pattern
  40. 40. OnDemand NAT Pattern Benefits: ● This lets you maintain system security because there is no routing of access from within to the Internet except for during maintenance ● The NAT instance operates only during use, reducing costs Cautions: ● Because, at the time of maintenance, operations are performed ranging from starting up the NAT instance through adjusting the routing of the subnets, it is safest if you automate these operations through a script, so that there will be no operator errors
  41. 41. Functional Firewall
  42. 42. Functional Firewall Benefits: ● Multi-tier access control improves security. The EC2 virtual servers are grouped by individual functions, eliminating the need to change the virtual firewall settings even when using the scale-out pattern Cautions: ● While several different definitions are possible because virtual firewalls are logical entities, creating too many makes them difficult to understand, so you need to think about the granularity of the groups
  43. 43. Multi Load Balancer
  44. 44. Multi Load Balancer Benefits: ● The behavior (on the load balancer level) for mobile sites and PC sites can be different, even when using the same EC2 instance ● Even when multiple SSLs (HTTPS) are used by the same EC2 instance, you can prepare ELBs for each SSL (HTTP) Cautions: ● When you use the SSL Termination function of an ELB, the EC2 instance side will be able to receive requests via HTTP, making it difficult to evaluate the HTTPS connection by the applications