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

Microservices Challenges

Microservices Challenges

This presentation approaches many challenges moving forward Microservices

Gustavo Pantuza

April 01, 2019
Tweet

More Decks by Gustavo Pantuza

Other Decks in Programming

Transcript

  1. Monolith • Big code base • Difficult to scale •

    Easy to monitor/troubleshoot • Many responsibilities • Complex to deploy
  2. Microservice • Small code base • Single responsibility • Complex

    to troubleshoot • Complex to monitor • Easier to test and deploy
  3. Step 2 If the microservices I integrate fail, how can

    I guarantee my authentication system? Circuit breaker
  4. Step 3 If x% of failure send emails to guarantee

    authentication Circuit breaker
  5. Scale Step 3 $> kubectl autoscale \ deployment php-apache \

    --cpu-percent=50 \ --min=1 \ --max=10
  6. User space Capacity Step 3 Turn off swap TCP/IP tuning

    Kernel space Operating system Tuning . swapoff --all . sysctl -w net.ipv4.tcp_fin_timeout=15
  7. Availability Step 1 A B C D E F G

    H Application servers/containers
  8. Availability Step 3 Load balancing A B C D E

    F G H • IPVS • Neutrino • HAProxy • Nginx L4 L7
  9. Step 1 Interfaces { "what": "A json example", "test": true,

    "values": [42, 10, 5.32], "data": { "name": "Test Name", "type": null } }
  10. Step 3 Generic and versioned Interfaces Interfaces . JSON Schema

    . ProtoBuffers /* Proto Buffers */ message Example { string what = 1; boolean test = 2; repeated int32 values = 3; optional DataMessage data = 4; } message DataMessage { string name = 1; optional string type = 2; }
  11. Step 3 Overlay networking . KubeRouter . VXLAN . Open

    vSwitch . IPIP tunnel . GRE Networking Subnet: 10.0.10.0/24 Subnet: 10.0.10.0/24 vRouter: 192.168.0.100/32 vRouter: 192.168.0.200/32
  12. Step 3 Tracing X-Request-ID GET /myservice/myresource HTTP/1.1 Host: myservername X-Request-ID:

    30f14c6c1fc85cba12bfd093aa8f90e3 Accept: */* A B C D Request Identification