2016 05-16 testing_distributed_systems_v1 1

22
Testing Distributed Systems Presented by Miguel Silva, QA Team Leader

Upload: feedzai

Post on 08-Apr-2017

125 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: 2016 05-16 testing_distributed_systems_v1 1

Testing Distributed Systems

Presented by Miguel Silva, QA Team Leader

Page 2: 2016 05-16 testing_distributed_systems_v1 1

Meet Feedzai

https://feedzai.wistia.com/medias/toz8ny7ep7

Page 3: 2016 05-16 testing_distributed_systems_v1 1

Buzzwords

Page 4: 2016 05-16 testing_distributed_systems_v1 1

Numbers

99.95 availabilityMax 250ms latency

$2B of transactions processed per day3 deployments in fortune 500 companies

Growing 2 person / week (Hiring!)

Page 5: 2016 05-16 testing_distributed_systems_v1 1

A typical deployment

Pulse serverApp engineSQL Databases

ZookeeperRabbitMqCassandra

18 machines

Page 6: 2016 05-16 testing_distributed_systems_v1 1

The largest deployment

2 Datacenters 6 environments 150 Servers 13Tb of memory 3000 cores 250Tb of storage

Page 7: 2016 05-16 testing_distributed_systems_v1 1

Go beyond unit tests

End to end functionalityFault-toleranceHigh-availabilityMachine / datacenter synchronization

Page 8: 2016 05-16 testing_distributed_systems_v1 1

Docker and bash

Hard to maintainHard to expandHard to CIHard to test scriptsHard to script tests

Page 9: 2016 05-16 testing_distributed_systems_v1 1

System-tests framework

Page 10: 2016 05-16 testing_distributed_systems_v1 1

System-tests framework

Page 11: 2016 05-16 testing_distributed_systems_v1 1

System-tests framework

Write system-tests like unit tests

Page 12: 2016 05-16 testing_distributed_systems_v1 1

System-tests framework

Write system-tests like unit tests

Page 13: 2016 05-16 testing_distributed_systems_v1 1

Feature highlights

Set a multi-container, multi-datacenter test scenario in couple of lines

Easy to assert cluster states, connections, applications, etc.

Make deployment-like scenario system-tests like you do a unit test

Page 14: 2016 05-16 testing_distributed_systems_v1 1

Feature highlights

Abstracted container creation, setup, volumes complexity from the tests

Integrated in CI environment (jenkins)

Developers easily implement system-tests

Page 15: 2016 05-16 testing_distributed_systems_v1 1

Bonus – production firewalls

All containers are blocked by a firewall

When testing, open only the necessary ports

Ensures functionality with production security

Page 16: 2016 05-16 testing_distributed_systems_v1 1

Bumps along the way

Docker demon may have some concurrency problems and some calls fail in some tests

Containers would not be removed

Solved by doing retries on some docker calls

Page 17: 2016 05-16 testing_distributed_systems_v1 1

Bumps along the way

Docker-java leaves TCP IP sockets stuck (TCP-WAIT)

No sockets available during a build run

Workaround by enabling socket reuse at kernel level

Page 18: 2016 05-16 testing_distributed_systems_v1 1

Bumps along the way

Before 1.9, container IP would change when containers are stopped/etc/hosts updated on every docker run

After 1.9, IPs are static and more predictableContainers always keep their IP

Page 19: 2016 05-16 testing_distributed_systems_v1 1

Current status

128Gb RAM24 CPU coresover SSD

315 tests3h build7 parallel tests runningUp to 100 parallel containers running

bottleneck

Page 20: 2016 05-16 testing_distributed_systems_v1 1

Next steps

Integrate more images

Docker swarm integration

Distributed test execution

Page 21: 2016 05-16 testing_distributed_systems_v1 1

Thank You

Page 22: 2016 05-16 testing_distributed_systems_v1 1

Visit www.feedzai.com/wickedsmart

LIVE EVENTS | MEET THE PEOPLE BEHIND THE MACHINE