Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Well Architected Java Backends

Well Architected Java Backends

The innovations in cloud computing brings many new options for Java architects. Architecture styles range from traditional monoliths to container-based microservices or even "serverless" functions. But the possibilities of services and stacks are so many that choosing the most adequate one can be overwhelming. This presentation is a guide through common implementation patterns for Java applications in the cloud.

The AWS Well Architected Framework will be used as a reference assessment of security, reliability, peformance efficiency, cost optimization and operational excellence. Although each organization will have its own peculiar needs, all share at least some concern for these key requirements. This talk presents reference implementations, tools and samples, focused with the peculiarities of the Java platform and frameworks.

Join this practical "state of the union" presentation and let's share practices and examples for well architected java backends.

Julio Faerman

June 19, 2018
Tweet

More Decks by Julio Faerman

Other Decks in Technology

Transcript

  1. Subjective Objective HTTPS Everywhere AES-GCM with Key Derivation Perfect Forward

    Secrecy Multi-Factor Authentication Temporary Credentials Live Log Analytics WAF Automation DDoS Protection Dependency Inspection CVE Agent …
  2. Operational Excellence Security Reliability Performance Efficiency Cost Optimization AWS Well

    Architected Framework SEC 1: How are you protecting access to and use of the AWS account root user credentials?
  3. Operational Excellence Security Reliability Performance Efficiency Cost Optimization AWS Well

    Architected Framework REL 8: How are you testing your resiliency?
  4. Operational Excellence Security Reliability Performance Efficiency Cost Optimization AWS Well

    Architected Framework PERF 2: How did you select your compute solution?
  5. Operational Excellence Security Reliability Performance Efficiency Cost Optimization AWS Well

    Architected Framework COST 4: How do you make sure your capacity matches but does not substantially exceed what you need?
  6. Operational Excellence Security Reliability Performance Efficiency Cost Optimization AWS Well

    Architected Framework OPS 3: How do you know that you are ready to support a workload?
  7. ``

  8. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. NVIDIA Tesla Volta V100 GPUs “At the limit of photolithography” - Jen-Hsun Huang, Nvidia's CEO 5K FP32 GPU Cores | 15.7 Peak FP32 TFLOPS 640 Tensor Cores, 64 FMA/clock, up to 125 Tensor Core TFLOPS 16 GB GPU memory with 900 GB/sec peak GPU memory bandwidth
  9. Handler Input/Output Types (Java) •Simple Java types (String, Integer, Boolean,

    Map, and List) •Plain Old Java Object •Stream type
  10. “Business Logic” Message Streams Monitoring & Logging Relational Database NoSQL

    Build & Test Machine Learning Deployment Object Storage Migration Networking Scaling Analytics Caching
  11. Amazon Aurora architecture Master Replica Replica Replica Availability Zone 1

    Shared storage volume Availability Zone 2 Availability Zone 3 Storage nodes with SSDs § Log-structured distributed storage system designed for databases § Storage volume is striped across hundreds of storage nodes distributed over 3 different availability zones § Six copies of data, two copies in each availability zone to protect against AZ+1 failures § More performance (~5x), cost efficiency (~0.6x) § IAM Authentication, Lambda Procedures, KMS encryption and many other features SQL Transactions Caching SQL Transactions Caching SQL Transactions Caching
  12. Sign up for the preview today Aurora Severless On-demand, auto-scaling

    database for applications with unpredictable or cyclical workloads Automatically scales capacity up and down Pay per second and only for the database capacity you use Starts up on demand and shuts down when not in use No need to provision instances NEW!
  13. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. ELASTIC CONTAINER SERVICE AWS VPC networking mode Advanced task placement Deep integration with AWS services ECS CLI … { } Global footprint Powerful scheduling engines Auto scaling CloudWatch metrics Load balancers
  14. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. • Cluster • Container Instances • Task Definition • Task • Service Amazon ECS Core Concepts
  15. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. { "family":"hello-world", "containerDefinitions":[ { "name":"hello-world", "image":"aws_account_id.dkr.ecr.us-east- 1.amazonaws.com/hello-world", "cpu":10, "memory":500, "portMappings":[ { "containerPort":80, "hostPort":80 } ], "entryPoint":[ "/usr/sbin/apache2", "-D", "FOREGROUND" ], "essential":true } ], "volumes": [] } Amazon ECS Task Definition Container Definitions Volume Definitions
  16. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. { "serviceName": "ecs-hello-world-elb", "taskDefinition": "hello-world", "loadBalancers": [ { "loadBalancerName": "EC2Contai- EcsElast-A0B1C2D3E4”, "containerName": "hello-world", "containerPort": 80 } ], "desiredCount": 10, "role": "ecsServiceRole" } Amazon ECS Service * Good for long-running applications * Load Balance traffic across containers * Automatically recover unhealthy containers * Discover services
  17. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. { "serviceName": "ecs-hello-world-elb", "taskDefinition": "hello-world", "deploymentConfiguration": { "maximumPercent": 100, "minimumHealthyPercent": 50 }, "loadBalancers": [ { "loadBalancerName": "EC2Contai-EcsElast-A0B1C2D3E4”, "containerName": "hello-world", "containerPort": 80 } ], "desiredCount": 10, "role": "ecsServiceRole" } Rolling Deployments
  18. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Create Amazon CloudWatch alarm on a metric, e.g. MemoryReservation Configure scaling policies to increase and decrease the size of your cluster Auto Scaling Your Amazon ECS Cluster
  19. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. CHANGING COMPUTE CONSUMPTION MODEL No instances to manage Task native API Resource based pricing Simple, easy to use, powerful – and new consumption model =
  20. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. RUNNING FARGATE CONTAINERS WITH ECS
  21. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. RUNNING FARGATE CONTAINERS WITH ECS Use ECS APIs to launch Fargate Containers Easy migration – Run Fargate and EC2 launch type tasks in the same cluster Same Task Definition schema
  22. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. TASK CPU & MEMORY CONFIGURATIONS Flexible configuration options – 50 CPU/memory configurations CPU Memory 256 (.25 vCPU) 512MB, 1GB, 2GB 512 (.5 vCPU) 1GB, 2GB, 3GB, 4GB 1024 (1 vCPU) 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB 2048 (2 vCPU) Between 4GB and 16GB in 1GB increments 4096 (4 vCPU) Between 8GB and 30GB in 1GB increments
  23. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Elastic Container Service for Kubernetes
  24. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. It i s K u b e r n e t e s U p s t r e a m P r o d u c ti o n w o r k l o a d s S e r v i c e i n te g r a ti o n s EKS Tenets
  25. © 2017, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Elastic Container Registry Fully Managed * Tight Integration with Amazon ECS * Integration with Docker Toolset * Management Console and AWS CLI Highly Available * Amazon S3 backed * Regional endpoints Secure * IAM Resource-based Policies * AWS CloudTrail Audit Logs * Images encrypted at transit and at rest
  26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. “You don’t have to be an engineer to be a racing driver, but you do have to have Mechanical Sympathy” Jackie Stewart - F1 Race Driver