SlideShare a Scribd company logo
@chbatey#Voxxed
Fault tolerant microservices
Christopher Batey
DataStax
@chbatey
Who am I?
• DataStax
- Technical Evangelist / Software Engineer
- Builds enterprise ready version of Apache
Cassandra
• Sky: Building next generation Internet TV
platform
• Lots of time working on a test double for
Apache Cassandra
@chbatey
Agenda
•Setting the scene
•What do we mean by a fault?
•What is a micro(ish)service?
•Monolith application vs the micro(ish)service
•A worked example
•Identify an issue
•Reproduce/test it
•Show how to deal with the issue
So… what do applications look like?
So... what do systems look like now?
But different things go wrong...
down
slow network
slow app
SLA: 2 second max
missing packets
GC :(
Pin
Service
Movie Player
User
Service
Device
Service
Play Movie
Example: Movie player service
@chbatey
Time for an example...
•All examples are on github
•Technologies used:
•Dropwizard
•Spring Boot
•Wiremock
•Hystrix
•Graphite
•Saboteur
@chbatey
Testing microservices
• You don’t know a service is fault tolerant
if you don’t test faults
Isolated service tests
Movie service
Mocks
User
Device
Pin service
Play Movie
Acceptance
Test
Prime
Real HTTP/TCP
@chbatey
Fault tolerance
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
@chbatey
1 - Don’t take forever
• If at first you don’t succeed, don’t take forever to tell someone
• Timeout and fail fast
@chbatey
Which timeouts?
• Socket connection timeout
• Socket read timeout
Your service hung for 30 seconds :(
Customer
You :(
@chbatey
Which timeouts?
• Socket connection timeout
• Socket read timeout
• Resource acquisition
Your service hung for 10 minutes :(
Let’s think about this
A little more detail
@chbatey
Wiremock + Saboteur + Vagrant
•Vagrant - launches + provisions local VMs
•Saboteur - uses tc, iptables to simulate network issues
•Wiremock - used to mock HTTP dependencies
•Cucumber - acceptance tests
I can write an automated test for that?
Wiremock:
•User Service
•Device Service
•Pin Service
S
a
b
o
t
e
u
r
Vagrant + Virtual box VM
Movie
Service
Acceptance
Test
prime to drop trafc
reset
@chbatey
Implementing reliable timeouts
• Protect the container thread!
• Homemade: Worker Queue + Thread pool (executor)
@chbatey
Implementing reliable timeouts
• Protect the container thread!
• Homemade: Worker Queue + Thread pool (executor)
• Hystrix
• Spring cloud Netflix
A simple Spring RestController
@RestController

public class Resource {



private static final Logger LOGGER = LoggerFactory.getLogger(Resource.class);



@Autowired

private ScaryDependency scaryDependency;



@RequestMapping("/scary")

public String callTheScaryDependency() {

LOGGER.info("Resource later: I wonder which thread I am on!");

return scaryDependency.getScaryString();

}

}
Scary dependency
@Component

public class ScaryDependency {



private static final Logger LOGGER = LoggerFactory.getLogger(ScaryDependency.class);



public String getScaryString() {

LOGGER.info("Scary Dependency: I wonder which thread I am on! Tomcats?”);

if (System.currentTimeMillis() % 2 == 0) {

return "Scary String";

} else {
Thread.sleep(5000)

return “Slow Scary String";

}

}

}
All on the tomcat thread
13:47:20.200 [http-8080-exec-1] INFO info.batey.examples.Resource -
Resource later: I wonder which thread I am on!
13:47:20.200 [http-8080-exec-1] INFO info.batey.examples.ScaryDependency
- Scary Dependency: I wonder which thread I am on! Tomcats?
Scary dependency
@Component

public class ScaryDependency {



private static final Logger LOGGER = LoggerFactory.getLogger(ScaryDependency.class);



@HystrixCommand()

public String getScaryString() {

LOGGER.info("Scary Dependency: I wonder which thread I am on! Tomcats?”);

if (System.currentTimeMillis() % 2 == 0) {

return "Scary String";

} else {
Thread.sleep(5000)

return “Slow Scary String";

}

}

}
What an annotation can do...
13:51:21.513 [http-8080-exec-1] INFO info.batey.examples.Resource - Resource
later: I wonder which thread I am on!
13:51:21.614 [hystrix-ScaryDependency-1] INFO info.batey.examples.ScaryDependency
- Scary Dependency: I wonder which thread I am on! Tomcats? :P
@chbatey
Timeouts take home
● You can’t use network level timeouts for SLAs
● Test your SLAs - if someone says you can’t, hit them with a stick
● Scary things happen without network issues
@chbatey
Fault tolerance
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
2 - Don’t try if you can’t succeed
Complexity
“When an application grows in complexity it will
eventually start sending emails”
Complexity
“When an application grows in complexity it will
eventually start using queues and thread pools”
Or use Akka :)
@chbatey
Don’t try if you can’t succeed
@chbatey
Don’t try if you can’t succeed
• Executor Unbounded queues :(
• newFixedThreadPool
• newSingleThreadExecutor
• newThreadCachedThreadPool
• Bound your queues and threads
• Fail quickly when the queue / maxPoolSize is met
• Know your drivers
@chbatey
This is a functional requirement
•Set the timeout very high
•Use Wiremock to add a large delay to the requests
@chbatey
This is a functional requirement
•Set the timeout very high
•Use Wiremock to add a large delay to the requests
•Set queue size and thread pool size to 1
•Send in 2 requests to use the thread and fill the queue
•What happens on the 3rd request?
@chbatey
Fault tolerance
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
3 - Fail gracefully
@chbatey
Expect rubbish
•Expect invalid HTTP
•Expect malformed response bodies
•Expect connection failures
•Expect huge / tiny responses
Testing with Wiremock
stubFor(get(urlEqualTo("/dependencyPath"))

.willReturn(aResponse()

.withFault(Fault.MALFORMED_RESPONSE_CHUNK)));

{

"request": {

"method": "GET",

"url": "/fault"

},

"response": {

"fault": "RANDOM_DATA_THEN_CLOSE"

}

{

"request": {

"method": "GET",

"url": "/fault"

},

"response": {

"fault": "EMPTY_RESPONSE"

}

}
Stubbed Cassandra
@chbatey
Fault tolerance
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
4 - Know if it’s your fault
@chbatey
Record stuff
•Metrics:
- Timings
- Errors
- Concurrent incoming requests
- Thread pool statistics
- Connection pool statistics
•Logging: Boundary logging, ElasticSearch / Logstash
•Request identifiers
Graphite + Codahale
Response times
@chbatey
Separate resource pools
•Don’t flood your dependencies
•Be able to answer the questions:
-How many connections will you
make to dependency X?
-Are you getting close to your max
connections?
So easy with Dropwizard + Hystrix
metrics:

reporters:

- type: graphite

host: 192.168.10.120

port: 2003

prex: shiny_app
@Override

public void initialize(Bootstrap<AppConfig> appConfigBootstrap) {

HystrixCodaHaleMetricsPublisher metricsPublisher = 

new HystrixCodaHaleMetricsPublisher(appConfigBootstrap.getMetricRegistry());

HystrixPlugins.getInstance().registerMetricsPublisher(metricsPublisher);

}
@chbatey
Fault tolerance
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
Pin
Service
Movie Player
User
Service
Device
Service
Play Movie
5 - Don’t whack a dead horse
@chbatey
What to do…
•Yes this will happen…
•Mandatory dependency - fail *really* fast
•Throttling
•Fallbacks
Circuit breaker pattern
Implementation with Hystrix


@Path("integrate")

public class IntegrationResource {



private static final Logger LOGGER = LoggerFactory.getLogger(IntegrationResource.class);



@GET

@Timed

public String integrate() {

LOGGER.info("integrate");

String user = new UserServiceDependency(userService).execute();

String device = new DeviceServiceDependency(deviceService).execute();

Boolean pinCheck = new PinCheckDependency(pinService).execute();

return String.format("[User info: %s] n[Device info: %s] n[Pin check: %s] n", user, device, pinCheck);

}



}
Implementation with Hystrix


public class PinCheckDependency extends HystrixCommand<Boolean> {



private HttpClient httpClient;



public PinCheckDependency(HttpClient httpClient) {

super(HystrixCommandGroupKey.Factory.asKey("PinCheckService"));

this.httpClient = httpClient;

}



@Override

protected Boolean run() throws Exception {

HttpGet pinCheck = new HttpGet("http://localhost:9090/pincheck");

HttpResponse pinCheckResponse = httpClient.execute(pinCheck);

int statusCode = pinCheckResponse.getStatusLine().getStatusCode();

if (statusCode != 200) {

throw new RuntimeException("Oh dear no pin check, status code " + statusCode);

}

String pinCheckInfo = EntityUtils.toString(pinCheckResponse.getEntity());

return Boolean.valueOf(pinCheckInfo);

}



}

Implementation with Hystrix


public class PinCheckDependency extends HystrixCommand<Boolean> {



private HttpClient httpClient;



public PinCheckDependency(HttpClient httpClient) {

super(HystrixCommandGroupKey.Factory.asKey("PinCheckService"));

this.httpClient = httpClient;

}



@Override

protected Boolean run() throws Exception {

HttpGet pinCheck = new HttpGet("http://localhost:9090/pincheck");

HttpResponse pinCheckResponse = httpClient.execute(pinCheck);

int statusCode = pinCheckResponse.getStatusLine().getStatusCode();

if (statusCode != 200) {

throw new RuntimeException("Oh dear no pin check, status code " + statusCode);

}

String pinCheckInfo = EntityUtils.toString(pinCheckResponse.getEntity());

return Boolean.valueOf(pinCheckInfo);

}



@Override

public Boolean getFallback() {

return true;

}

}

@chbatey
Triggering the fallback
•Error threshold percentage
•Bucket of time for the percentage
•Minimum number of requests to trigger
•Time before trying a request again
•Disable
•Per instance statistics
@chbatey
Fault tolerance
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
@chbatey
6 - Turn off broken stuff
• The kill switch
@chbatey
To recap
1.Don’t take forever - Timeouts
2.Don’t try if you can’t succeed
3.Fail gracefully
4.Know if it’s your fault
5.Don’t whack a dead horse
6.Turn broken stuff off
@chbatey
Links
• Examples:
- https://github.com/chbatey/spring-cloud-example
- https://github.com/chbatey/dropwizard-hystrix
- https://github.com/chbatey/vagrant-wiremock-saboteur
• Tech:
- https://github.com/Netflix/Hystrix
- https://www.vagrantup.com/
- http://wiremock.org/
- https://github.com/tomakehurst/saboteur
@chbatey
Questions?
Thanks for listening!
Questions: @chbatey
http://christopher-batey.blogspot.co.uk/
@chbatey
Developer takeaways
● Learn about TCP
● Love vagrant, docker etc to enable testing
● Don’t trust libraries
Hystrix cost - do this yourself
@chbatey
Hystrix metrics
● Failure count
● Percentiles from Hystrix point of view
● Error percentages
@chbatey
How to test metric publishing?
● Stub out graphite and verify calls?
● Programmatically call graphite and verify numbers?
● Make metrics + logs part of the story demo

More Related Content

What's hot

Manchester Hadoop Meetup: Cassandra Spark internals
Manchester Hadoop Meetup: Cassandra Spark internalsManchester Hadoop Meetup: Cassandra Spark internals
Manchester Hadoop Meetup: Cassandra Spark internals
Christopher Batey
 
Circuit breakers - Using Spring-Boot + Hystrix + Dashboard + Retry
Circuit breakers - Using Spring-Boot + Hystrix + Dashboard + RetryCircuit breakers - Using Spring-Boot + Hystrix + Dashboard + Retry
Circuit breakers - Using Spring-Boot + Hystrix + Dashboard + Retry
Bruno Henrique Rother
 
The Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneThe Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOne
Konrad Malawski
 
Reactive Programming with Rx
 Reactive Programming with Rx Reactive Programming with Rx
Reactive Programming with Rx
C4Media
 
Distributed Consensus A.K.A. "What do we eat for lunch?"
Distributed Consensus A.K.A. "What do we eat for lunch?"Distributed Consensus A.K.A. "What do we eat for lunch?"
Distributed Consensus A.K.A. "What do we eat for lunch?"
Konrad Malawski
 
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
Konrad Malawski
 
Protect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying TechniquesProtect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying Techniques
Leo Loobeek
 
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYCBuilding a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Konrad Malawski
 
DSR Microservices (Day 1, Part 2)
DSR Microservices (Day 1, Part 2)DSR Microservices (Day 1, Part 2)
DSR Microservices (Day 1, Part 2)
Steve Upton
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End Development
All Things Open
 
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka StreamsFresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka StreamsKonrad Malawski
 
Async – react, don't wait
Async – react, don't waitAsync – react, don't wait
Async – react, don't wait
Johan AndrĂŠn
 
3 years with Clojure
3 years with Clojure3 years with Clojure
3 years with Clojure
Michael Klishin
 
How to debug slow lambda response times
How to debug slow lambda response timesHow to debug slow lambda response times
How to debug slow lambda response times
Yan Cui
 
Resilience with Hystrix
Resilience with HystrixResilience with Hystrix
Resilience with Hystrix
Uwe Friedrichsen
 
Building reactive distributed systems with Akka
Building reactive distributed systems with Akka Building reactive distributed systems with Akka
Building reactive distributed systems with Akka
Johan AndrĂŠn
 
PAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLERPAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLER
Neotys
 
Multithreading and concurrency in android
Multithreading and concurrency in androidMultithreading and concurrency in android
Multithreading and concurrency in android
Rakesh Jha
 
Async - react, don't wait - PingConf
Async - react, don't wait - PingConfAsync - react, don't wait - PingConf
Async - react, don't wait - PingConf
Johan AndrĂŠn
 
谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testability谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testabilitydrewz lin
 

What's hot (20)

Manchester Hadoop Meetup: Cassandra Spark internals
Manchester Hadoop Meetup: Cassandra Spark internalsManchester Hadoop Meetup: Cassandra Spark internals
Manchester Hadoop Meetup: Cassandra Spark internals
 
Circuit breakers - Using Spring-Boot + Hystrix + Dashboard + Retry
Circuit breakers - Using Spring-Boot + Hystrix + Dashboard + RetryCircuit breakers - Using Spring-Boot + Hystrix + Dashboard + Retry
Circuit breakers - Using Spring-Boot + Hystrix + Dashboard + Retry
 
The Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOneThe Cloud-natives are RESTless @ JavaOne
The Cloud-natives are RESTless @ JavaOne
 
Reactive Programming with Rx
 Reactive Programming with Rx Reactive Programming with Rx
Reactive Programming with Rx
 
Distributed Consensus A.K.A. "What do we eat for lunch?"
Distributed Consensus A.K.A. "What do we eat for lunch?"Distributed Consensus A.K.A. "What do we eat for lunch?"
Distributed Consensus A.K.A. "What do we eat for lunch?"
 
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
 
Protect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying TechniquesProtect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying Techniques
 
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYCBuilding a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
Building a Reactive System with Akka - Workshop @ O'Reilly SAConf NYC
 
DSR Microservices (Day 1, Part 2)
DSR Microservices (Day 1, Part 2)DSR Microservices (Day 1, Part 2)
DSR Microservices (Day 1, Part 2)
 
We Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End DevelopmentWe Are All Testers Now: The Testing Pyramid and Front-End Development
We Are All Testers Now: The Testing Pyramid and Front-End Development
 
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka StreamsFresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
Fresh from the Oven (04.2015): Experimental Akka Typed and Akka Streams
 
Async – react, don't wait
Async – react, don't waitAsync – react, don't wait
Async – react, don't wait
 
3 years with Clojure
3 years with Clojure3 years with Clojure
3 years with Clojure
 
How to debug slow lambda response times
How to debug slow lambda response timesHow to debug slow lambda response times
How to debug slow lambda response times
 
Resilience with Hystrix
Resilience with HystrixResilience with Hystrix
Resilience with Hystrix
 
Building reactive distributed systems with Akka
Building reactive distributed systems with Akka Building reactive distributed systems with Akka
Building reactive distributed systems with Akka
 
PAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLERPAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLER
 
Multithreading and concurrency in android
Multithreading and concurrency in androidMultithreading and concurrency in android
Multithreading and concurrency in android
 
Async - react, don't wait - PingConf
Async - react, don't wait - PingConfAsync - react, don't wait - PingConf
Async - react, don't wait - PingConf
 
谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testability谷歌 Scott-lessons learned in testability
谷歌 Scott-lessons learned in testability
 

Viewers also liked

Vienna Feb 2015: Cassandra: How it works and what it's good for!
Vienna Feb 2015: Cassandra: How it works and what it's good for!Vienna Feb 2015: Cassandra: How it works and what it's good for!
Vienna Feb 2015: Cassandra: How it works and what it's good for!
Christopher Batey
 
Cassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra ApplicationsCassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra Applications
Christopher Batey
 
Jan 2015 - Cassandra101 Manchester Meetup
Jan 2015 - Cassandra101 Manchester MeetupJan 2015 - Cassandra101 Manchester Meetup
Jan 2015 - Cassandra101 Manchester Meetup
Christopher Batey
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java Developers
Christopher Batey
 
Cassandra Day London: Building Java Applications
Cassandra Day London: Building Java ApplicationsCassandra Day London: Building Java Applications
Cassandra Day London: Building Java Applications
Christopher Batey
 
Munich March 2015 - Cassandra + Spark Overview
Munich March 2015 -  Cassandra + Spark OverviewMunich March 2015 -  Cassandra + Spark Overview
Munich March 2015 - Cassandra + Spark Overview
Christopher Batey
 
LJC: Fault tolerance with Apache Cassandra
LJC: Fault tolerance with Apache CassandraLJC: Fault tolerance with Apache Cassandra
LJC: Fault tolerance with Apache Cassandra
Christopher Batey
 
Reading Cassandra Meetup Feb 2015: Apache Spark
Reading Cassandra Meetup Feb 2015: Apache SparkReading Cassandra Meetup Feb 2015: Apache Spark
Reading Cassandra Meetup Feb 2015: Apache Spark
Christopher Batey
 

Viewers also liked (8)

Vienna Feb 2015: Cassandra: How it works and what it's good for!
Vienna Feb 2015: Cassandra: How it works and what it's good for!Vienna Feb 2015: Cassandra: How it works and what it's good for!
Vienna Feb 2015: Cassandra: How it works and what it's good for!
 
Cassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra ApplicationsCassandra Summit EU 2014 - Testing Cassandra Applications
Cassandra Summit EU 2014 - Testing Cassandra Applications
 
Jan 2015 - Cassandra101 Manchester Meetup
Jan 2015 - Cassandra101 Manchester MeetupJan 2015 - Cassandra101 Manchester Meetup
Jan 2015 - Cassandra101 Manchester Meetup
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java Developers
 
Cassandra Day London: Building Java Applications
Cassandra Day London: Building Java ApplicationsCassandra Day London: Building Java Applications
Cassandra Day London: Building Java Applications
 
Munich March 2015 - Cassandra + Spark Overview
Munich March 2015 -  Cassandra + Spark OverviewMunich March 2015 -  Cassandra + Spark Overview
Munich March 2015 - Cassandra + Spark Overview
 
LJC: Fault tolerance with Apache Cassandra
LJC: Fault tolerance with Apache CassandraLJC: Fault tolerance with Apache Cassandra
LJC: Fault tolerance with Apache Cassandra
 
Reading Cassandra Meetup Feb 2015: Apache Spark
Reading Cassandra Meetup Feb 2015: Apache SparkReading Cassandra Meetup Feb 2015: Apache Spark
Reading Cassandra Meetup Feb 2015: Apache Spark
 

Similar to Voxxed Vienna 2015 Fault tolerant microservices

Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014
Christopher Batey
 
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Flink Forward
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
John Adams
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
Fabio Tiriticco
 
Watch How The Giants Fall: Learning from Bug Bounty Results
Watch How The Giants Fall: Learning from Bug Bounty ResultsWatch How The Giants Fall: Learning from Bug Bounty Results
Watch How The Giants Fall: Learning from Bug Bounty Results
jtmelton
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
John Adams
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at Netflix
Gareth Bowles
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
Igalia
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
Evan McGee
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
Ortus Solutions, Corp
 
Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)
Brian Brazil
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
thelabdude
 
Velocity 2016 - Operational Excellence with Hystrix
Velocity 2016 - Operational Excellence with HystrixVelocity 2016 - Operational Excellence with Hystrix
Velocity 2016 - Operational Excellence with Hystrix
Billy Yuen
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
Vincent Massol
 
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
DataStax
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
💡 Tomasz Kogut
 
I Don't Test Often ...
I Don't Test Often ...I Don't Test Often ...
I Don't Test Often ...
Gareth Bowles
 
I don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth BowlesI don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth Bowles
QA or the Highway
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
Roger Xia
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitterliujianrong
 

Similar to Voxxed Vienna 2015 Fault tolerant microservices (20)

Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014Fault tolerant microservices - LJC Skills Matter 4thNov2014
Fault tolerant microservices - LJC Skills Matter 4thNov2014
 
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
WebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! FrameworkWebSockets wiith Scala and Play! Framework
WebSockets wiith Scala and Play! Framework
 
Watch How The Giants Fall: Learning from Bug Bounty Results
Watch How The Giants Fall: Learning from Bug Bounty ResultsWatch How The Giants Fall: Learning from Bug Bounty Results
Watch How The Giants Fall: Learning from Bug Bounty Results
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at Netflix
 
Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)Streams API (Web Engines Hackfest 2015)
Streams API (Web Engines Hackfest 2015)
 
FreeSWITCH as a Microservice
FreeSWITCH as a MicroserviceFreeSWITCH as a Microservice
FreeSWITCH as a Microservice
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
 
Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Velocity 2016 - Operational Excellence with Hystrix
Velocity 2016 - Operational Excellence with HystrixVelocity 2016 - Operational Excellence with Hystrix
Velocity 2016 - Operational Excellence with Hystrix
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
 
Exploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservicesExploring Twitter's Finagle technology stack for microservices
Exploring Twitter's Finagle technology stack for microservices
 
I Don't Test Often ...
I Don't Test Often ...I Don't Test Often ...
I Don't Test Often ...
 
I don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth BowlesI don't always test...but when I do I test in production - Gareth Bowles
I don't always test...but when I do I test in production - Gareth Bowles
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 

More from Christopher Batey

Cassandra summit LWTs
Cassandra summit  LWTsCassandra summit  LWTs
Cassandra summit LWTs
Christopher Batey
 
Docker and jvm. A good idea?
Docker and jvm. A good idea?Docker and jvm. A good idea?
Docker and jvm. A good idea?
Christopher Batey
 
Cassandra Day NYC - Cassandra anti patterns
Cassandra Day NYC - Cassandra anti patternsCassandra Day NYC - Cassandra anti patterns
Cassandra Day NYC - Cassandra anti patterns
Christopher Batey
 
Think your software is fault-tolerant? Prove it!
Think your software is fault-tolerant? Prove it!Think your software is fault-tolerant? Prove it!
Think your software is fault-tolerant? Prove it!
Christopher Batey
 
Cassandra London - 2.2 and 3.0
Cassandra London - 2.2 and 3.0Cassandra London - 2.2 and 3.0
Cassandra London - 2.2 and 3.0
Christopher Batey
 
Cassandra London - C* Spark Connector
Cassandra London - C* Spark ConnectorCassandra London - C* Spark Connector
Cassandra London - C* Spark Connector
Christopher Batey
 
IoT London July 2015
IoT London July 2015IoT London July 2015
IoT London July 2015
Christopher Batey
 
1 Dundee - Cassandra 101
1 Dundee - Cassandra 1011 Dundee - Cassandra 101
1 Dundee - Cassandra 101
Christopher Batey
 
2 Dundee - Cassandra-3
2 Dundee - Cassandra-32 Dundee - Cassandra-3
2 Dundee - Cassandra-3
Christopher Batey
 
3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers
Christopher Batey
 
Paris Day Cassandra: Use case
Paris Day Cassandra: Use caseParis Day Cassandra: Use case
Paris Day Cassandra: Use case
Christopher Batey
 
Dublin Meetup: Cassandra anti patterns
Dublin Meetup: Cassandra anti patternsDublin Meetup: Cassandra anti patterns
Dublin Meetup: Cassandra anti patterns
Christopher Batey
 
Data Science Lab Meetup: Cassandra and Spark
Data Science Lab Meetup: Cassandra and SparkData Science Lab Meetup: Cassandra and Spark
Data Science Lab Meetup: Cassandra and Spark
Christopher Batey
 
Manchester Hadoop Meetup: Spark Cassandra Integration
Manchester Hadoop Meetup: Spark Cassandra IntegrationManchester Hadoop Meetup: Spark Cassandra Integration
Manchester Hadoop Meetup: Spark Cassandra Integration
Christopher Batey
 
Manchester Hadoop User Group: Cassandra Intro
Manchester Hadoop User Group: Cassandra IntroManchester Hadoop User Group: Cassandra Intro
Manchester Hadoop User Group: Cassandra Intro
Christopher Batey
 
Webinar Cassandra Anti-Patterns
Webinar Cassandra Anti-PatternsWebinar Cassandra Anti-Patterns
Webinar Cassandra Anti-Patterns
Christopher Batey
 
LA Cassandra Day 2015 - Testing Cassandra
LA Cassandra Day 2015  - Testing CassandraLA Cassandra Day 2015  - Testing Cassandra
LA Cassandra Day 2015 - Testing Cassandra
Christopher Batey
 
LA Cassandra Day 2015 - Cassandra for developers
LA Cassandra Day 2015  - Cassandra for developersLA Cassandra Day 2015  - Cassandra for developers
LA Cassandra Day 2015 - Cassandra for developers
Christopher Batey
 
Cassandra Summit EU 2014 Lightning talk - Paging (no animation)
Cassandra Summit EU 2014 Lightning talk - Paging (no animation)Cassandra Summit EU 2014 Lightning talk - Paging (no animation)
Cassandra Summit EU 2014 Lightning talk - Paging (no animation)
Christopher Batey
 

More from Christopher Batey (19)

Cassandra summit LWTs
Cassandra summit  LWTsCassandra summit  LWTs
Cassandra summit LWTs
 
Docker and jvm. A good idea?
Docker and jvm. A good idea?Docker and jvm. A good idea?
Docker and jvm. A good idea?
 
Cassandra Day NYC - Cassandra anti patterns
Cassandra Day NYC - Cassandra anti patternsCassandra Day NYC - Cassandra anti patterns
Cassandra Day NYC - Cassandra anti patterns
 
Think your software is fault-tolerant? Prove it!
Think your software is fault-tolerant? Prove it!Think your software is fault-tolerant? Prove it!
Think your software is fault-tolerant? Prove it!
 
Cassandra London - 2.2 and 3.0
Cassandra London - 2.2 and 3.0Cassandra London - 2.2 and 3.0
Cassandra London - 2.2 and 3.0
 
Cassandra London - C* Spark Connector
Cassandra London - C* Spark ConnectorCassandra London - C* Spark Connector
Cassandra London - C* Spark Connector
 
IoT London July 2015
IoT London July 2015IoT London July 2015
IoT London July 2015
 
1 Dundee - Cassandra 101
1 Dundee - Cassandra 1011 Dundee - Cassandra 101
1 Dundee - Cassandra 101
 
2 Dundee - Cassandra-3
2 Dundee - Cassandra-32 Dundee - Cassandra-3
2 Dundee - Cassandra-3
 
3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers3 Dundee-Spark Overview for C* developers
3 Dundee-Spark Overview for C* developers
 
Paris Day Cassandra: Use case
Paris Day Cassandra: Use caseParis Day Cassandra: Use case
Paris Day Cassandra: Use case
 
Dublin Meetup: Cassandra anti patterns
Dublin Meetup: Cassandra anti patternsDublin Meetup: Cassandra anti patterns
Dublin Meetup: Cassandra anti patterns
 
Data Science Lab Meetup: Cassandra and Spark
Data Science Lab Meetup: Cassandra and SparkData Science Lab Meetup: Cassandra and Spark
Data Science Lab Meetup: Cassandra and Spark
 
Manchester Hadoop Meetup: Spark Cassandra Integration
Manchester Hadoop Meetup: Spark Cassandra IntegrationManchester Hadoop Meetup: Spark Cassandra Integration
Manchester Hadoop Meetup: Spark Cassandra Integration
 
Manchester Hadoop User Group: Cassandra Intro
Manchester Hadoop User Group: Cassandra IntroManchester Hadoop User Group: Cassandra Intro
Manchester Hadoop User Group: Cassandra Intro
 
Webinar Cassandra Anti-Patterns
Webinar Cassandra Anti-PatternsWebinar Cassandra Anti-Patterns
Webinar Cassandra Anti-Patterns
 
LA Cassandra Day 2015 - Testing Cassandra
LA Cassandra Day 2015  - Testing CassandraLA Cassandra Day 2015  - Testing Cassandra
LA Cassandra Day 2015 - Testing Cassandra
 
LA Cassandra Day 2015 - Cassandra for developers
LA Cassandra Day 2015  - Cassandra for developersLA Cassandra Day 2015  - Cassandra for developers
LA Cassandra Day 2015 - Cassandra for developers
 
Cassandra Summit EU 2014 Lightning talk - Paging (no animation)
Cassandra Summit EU 2014 Lightning talk - Paging (no animation)Cassandra Summit EU 2014 Lightning talk - Paging (no animation)
Cassandra Summit EU 2014 Lightning talk - Paging (no animation)
 

Recently uploaded

Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni GarcĂ­a
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 

Recently uploaded (20)

Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 

Voxxed Vienna 2015 Fault tolerant microservices

  • 2. @chbatey Who am I? • DataStax - Technical Evangelist / Software Engineer - Builds enterprise ready version of Apache Cassandra • Sky: Building next generation Internet TV platform • Lots of time working on a test double for Apache Cassandra
  • 3. @chbatey Agenda •Setting the scene •What do we mean by a fault? •What is a micro(ish)service? •Monolith application vs the micro(ish)service •A worked example •Identify an issue •Reproduce/test it •Show how to deal with the issue
  • 4. So… what do applications look like?
  • 5. So... what do systems look like now?
  • 6. But different things go wrong... down slow network slow app SLA: 2 second max missing packets GC :(
  • 8. @chbatey Time for an example... •All examples are on github •Technologies used: •Dropwizard •Spring Boot •Wiremock •Hystrix •Graphite •Saboteur
  • 9. @chbatey Testing microservices • You don’t know a service is fault tolerant if you don’t test faults
  • 10. Isolated service tests Movie service Mocks User Device Pin service Play Movie Acceptance Test Prime Real HTTP/TCP
  • 11. @chbatey Fault tolerance 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 12. @chbatey 1 - Don’t take forever • If at first you don’t succeed, don’t take forever to tell someone • Timeout and fail fast
  • 13. @chbatey Which timeouts? • Socket connection timeout • Socket read timeout
  • 14. Your service hung for 30 seconds :( Customer You :(
  • 15. @chbatey Which timeouts? • Socket connection timeout • Socket read timeout • Resource acquisition
  • 16. Your service hung for 10 minutes :(
  • 18. A little more detail
  • 19. @chbatey Wiremock + Saboteur + Vagrant •Vagrant - launches + provisions local VMs •Saboteur - uses tc, iptables to simulate network issues •Wiremock - used to mock HTTP dependencies •Cucumber - acceptance tests
  • 20. I can write an automated test for that? Wiremock: •User Service •Device Service •Pin Service S a b o t e u r Vagrant + Virtual box VM Movie Service Acceptance Test prime to drop trafc reset
  • 21. @chbatey Implementing reliable timeouts • Protect the container thread! • Homemade: Worker Queue + Thread pool (executor)
  • 22. @chbatey Implementing reliable timeouts • Protect the container thread! • Homemade: Worker Queue + Thread pool (executor) • Hystrix • Spring cloud Netflix
  • 23. A simple Spring RestController @RestController
 public class Resource {
 
 private static final Logger LOGGER = LoggerFactory.getLogger(Resource.class);
 
 @Autowired
 private ScaryDependency scaryDependency;
 
 @RequestMapping("/scary")
 public String callTheScaryDependency() {
 LOGGER.info("Resource later: I wonder which thread I am on!");
 return scaryDependency.getScaryString();
 }
 }
  • 24. Scary dependency @Component
 public class ScaryDependency {
 
 private static final Logger LOGGER = LoggerFactory.getLogger(ScaryDependency.class);
 
 public String getScaryString() {
 LOGGER.info("Scary Dependency: I wonder which thread I am on! Tomcats?”);
 if (System.currentTimeMillis() % 2 == 0) {
 return "Scary String";
 } else { Thread.sleep(5000)
 return “Slow Scary String";
 }
 }
 }
  • 25. All on the tomcat thread 13:47:20.200 [http-8080-exec-1] INFO info.batey.examples.Resource - Resource later: I wonder which thread I am on! 13:47:20.200 [http-8080-exec-1] INFO info.batey.examples.ScaryDependency - Scary Dependency: I wonder which thread I am on! Tomcats?
  • 26. Scary dependency @Component
 public class ScaryDependency {
 
 private static final Logger LOGGER = LoggerFactory.getLogger(ScaryDependency.class);
 
 @HystrixCommand()
 public String getScaryString() {
 LOGGER.info("Scary Dependency: I wonder which thread I am on! Tomcats?”);
 if (System.currentTimeMillis() % 2 == 0) {
 return "Scary String";
 } else { Thread.sleep(5000)
 return “Slow Scary String";
 }
 }
 }
  • 27. What an annotation can do... 13:51:21.513 [http-8080-exec-1] INFO info.batey.examples.Resource - Resource later: I wonder which thread I am on! 13:51:21.614 [hystrix-ScaryDependency-1] INFO info.batey.examples.ScaryDependency - Scary Dependency: I wonder which thread I am on! Tomcats? :P
  • 28. @chbatey Timeouts take home ● You can’t use network level timeouts for SLAs ● Test your SLAs - if someone says you can’t, hit them with a stick ● Scary things happen without network issues
  • 29. @chbatey Fault tolerance 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 30. 2 - Don’t try if you can’t succeed
  • 31. Complexity “When an application grows in complexity it will eventually start sending emails”
  • 32. Complexity “When an application grows in complexity it will eventually start using queues and thread pools” Or use Akka :)
  • 33. @chbatey Don’t try if you can’t succeed
  • 34. @chbatey Don’t try if you can’t succeed • Executor Unbounded queues :( • newFixedThreadPool • newSingleThreadExecutor • newThreadCachedThreadPool • Bound your queues and threads • Fail quickly when the queue / maxPoolSize is met • Know your drivers
  • 35. @chbatey This is a functional requirement •Set the timeout very high •Use Wiremock to add a large delay to the requests
  • 36. @chbatey This is a functional requirement •Set the timeout very high •Use Wiremock to add a large delay to the requests •Set queue size and thread pool size to 1 •Send in 2 requests to use the thread and fill the queue •What happens on the 3rd request?
  • 37. @chbatey Fault tolerance 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 38. 3 - Fail gracefully
  • 39. @chbatey Expect rubbish •Expect invalid HTTP •Expect malformed response bodies •Expect connection failures •Expect huge / tiny responses
  • 40. Testing with Wiremock stubFor(get(urlEqualTo("/dependencyPath"))
 .willReturn(aResponse()
 .withFault(Fault.MALFORMED_RESPONSE_CHUNK)));
 {
 "request": {
 "method": "GET",
 "url": "/fault"
 },
 "response": {
 "fault": "RANDOM_DATA_THEN_CLOSE"
 }
 {
 "request": {
 "method": "GET",
 "url": "/fault"
 },
 "response": {
 "fault": "EMPTY_RESPONSE"
 }
 }
  • 42. @chbatey Fault tolerance 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 43. 4 - Know if it’s your fault
  • 44. @chbatey Record stuff •Metrics: - Timings - Errors - Concurrent incoming requests - Thread pool statistics - Connection pool statistics •Logging: Boundary logging, ElasticSearch / Logstash •Request identifiers
  • 47. @chbatey Separate resource pools •Don’t flood your dependencies •Be able to answer the questions: -How many connections will you make to dependency X? -Are you getting close to your max connections?
  • 48. So easy with Dropwizard + Hystrix metrics:
 reporters:
 - type: graphite
 host: 192.168.10.120
 port: 2003
 prex: shiny_app @Override
 public void initialize(Bootstrap<AppConfig> appConfigBootstrap) {
 HystrixCodaHaleMetricsPublisher metricsPublisher = 
 new HystrixCodaHaleMetricsPublisher(appConfigBootstrap.getMetricRegistry());
 HystrixPlugins.getInstance().registerMetricsPublisher(metricsPublisher);
 }
  • 49. @chbatey Fault tolerance 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 51. @chbatey What to do… •Yes this will happen… •Mandatory dependency - fail *really* fast •Throttling •Fallbacks
  • 53. Implementation with Hystrix 
 @Path("integrate")
 public class IntegrationResource {
 
 private static final Logger LOGGER = LoggerFactory.getLogger(IntegrationResource.class);
 
 @GET
 @Timed
 public String integrate() {
 LOGGER.info("integrate");
 String user = new UserServiceDependency(userService).execute();
 String device = new DeviceServiceDependency(deviceService).execute();
 Boolean pinCheck = new PinCheckDependency(pinService).execute();
 return String.format("[User info: %s] n[Device info: %s] n[Pin check: %s] n", user, device, pinCheck);
 }
 
 }
  • 54. Implementation with Hystrix 
 public class PinCheckDependency extends HystrixCommand<Boolean> {
 
 private HttpClient httpClient;
 
 public PinCheckDependency(HttpClient httpClient) {
 super(HystrixCommandGroupKey.Factory.asKey("PinCheckService"));
 this.httpClient = httpClient;
 }
 
 @Override
 protected Boolean run() throws Exception {
 HttpGet pinCheck = new HttpGet("http://localhost:9090/pincheck");
 HttpResponse pinCheckResponse = httpClient.execute(pinCheck);
 int statusCode = pinCheckResponse.getStatusLine().getStatusCode();
 if (statusCode != 200) {
 throw new RuntimeException("Oh dear no pin check, status code " + statusCode);
 }
 String pinCheckInfo = EntityUtils.toString(pinCheckResponse.getEntity());
 return Boolean.valueOf(pinCheckInfo);
 }
 
 }

  • 55. Implementation with Hystrix 
 public class PinCheckDependency extends HystrixCommand<Boolean> {
 
 private HttpClient httpClient;
 
 public PinCheckDependency(HttpClient httpClient) {
 super(HystrixCommandGroupKey.Factory.asKey("PinCheckService"));
 this.httpClient = httpClient;
 }
 
 @Override
 protected Boolean run() throws Exception {
 HttpGet pinCheck = new HttpGet("http://localhost:9090/pincheck");
 HttpResponse pinCheckResponse = httpClient.execute(pinCheck);
 int statusCode = pinCheckResponse.getStatusLine().getStatusCode();
 if (statusCode != 200) {
 throw new RuntimeException("Oh dear no pin check, status code " + statusCode);
 }
 String pinCheckInfo = EntityUtils.toString(pinCheckResponse.getEntity());
 return Boolean.valueOf(pinCheckInfo);
 }
 
 @Override
 public Boolean getFallback() {
 return true;
 }
 }

  • 56. @chbatey Triggering the fallback •Error threshold percentage •Bucket of time for the percentage •Minimum number of requests to trigger •Time before trying a request again •Disable •Per instance statistics
  • 57. @chbatey Fault tolerance 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 58. @chbatey 6 - Turn off broken stuff • The kill switch
  • 59. @chbatey To recap 1.Don’t take forever - Timeouts 2.Don’t try if you can’t succeed 3.Fail gracefully 4.Know if it’s your fault 5.Don’t whack a dead horse 6.Turn broken stuff off
  • 60. @chbatey Links • Examples: - https://github.com/chbatey/spring-cloud-example - https://github.com/chbatey/dropwizard-hystrix - https://github.com/chbatey/vagrant-wiremock-saboteur • Tech: - https://github.com/Netflix/Hystrix - https://www.vagrantup.com/ - http://wiremock.org/ - https://github.com/tomakehurst/saboteur
  • 61. @chbatey Questions? Thanks for listening! Questions: @chbatey http://christopher-batey.blogspot.co.uk/
  • 62. @chbatey Developer takeaways ● Learn about TCP ● Love vagrant, docker etc to enable testing ● Don’t trust libraries
  • 63. Hystrix cost - do this yourself
  • 64. @chbatey Hystrix metrics ● Failure count ● Percentiles from Hystrix point of view ● Error percentages
  • 65. @chbatey How to test metric publishing? ● Stub out graphite and verify calls? ● Programmatically call graphite and verify numbers? ● Make metrics + logs part of the story demo