The document discusses designing fault tolerant microservices. It introduces common faults like network issues and describes six principles for building fault tolerance: 1) use timeouts to fail fast, 2) bound work queues to prevent unbounded growth, 3) fail gracefully by expecting errors from dependencies, 4) monitor dependencies to understand faults, 5) implement circuit breakers to avoid retrying broken services, and 6) include kill switches to disable broken components. Code examples demonstrate implementing these principles using tools like Hystrix, Wiremock and Graphite.
An online event management system is a software that allows users to plan, organize and manage events from start to finish on a single platform. With the rise of digital technology, online event management systems have become increasingly popular due to their ability to streamline the event planning process.
Bahmni - Open Source EHR System (By Ranjan Sakalley)Bahmni
Bahmni - affordable, simple and scalable EMR system that can be installed from a primary health care clinic to a integral part of a national health records strategy/implementation.
This presentation was originally presented at AEHIN: https://aehin.hingx.org/bahmni
A peek into the middle of the enterprise software architecture stack.
A curtain raiser into the middleware of the software technology stack. Showcases Types of middleware, configuration possibilities, high level components, features, messaging models, deployment,
A brief history of Blinkist backend time. I gave this talk at the Adidas Developer conference in Erlangen. The Adidas developer community is awesome! Go check out their Github repositories for all the project they've contributed https://github.com/adidas
An online event management system is a software that allows users to plan, organize and manage events from start to finish on a single platform. With the rise of digital technology, online event management systems have become increasingly popular due to their ability to streamline the event planning process.
Bahmni - Open Source EHR System (By Ranjan Sakalley)Bahmni
Bahmni - affordable, simple and scalable EMR system that can be installed from a primary health care clinic to a integral part of a national health records strategy/implementation.
This presentation was originally presented at AEHIN: https://aehin.hingx.org/bahmni
A peek into the middle of the enterprise software architecture stack.
A curtain raiser into the middleware of the software technology stack. Showcases Types of middleware, configuration possibilities, high level components, features, messaging models, deployment,
A brief history of Blinkist backend time. I gave this talk at the Adidas Developer conference in Erlangen. The Adidas developer community is awesome! Go check out their Github repositories for all the project they've contributed https://github.com/adidas
Simple REST-APIs with Dropwizard and SwaggerLeanIX GmbH
During the VOXXED Days in Berlin on 29 January 2016 Bernd Schönbach from LeanIX demonstrated an easy way to create well documented and implemented REST-APIs using the Dropwizard Library for the implementation and Swagger for easy Documentation.
===
LeanIX offers an innovative software-as-a-service solution for Enterprise Architecture Management (EAM), based either in a public cloud or the client’s data center.
Companies like Adidas, Axel Springer, Helvetia, RWE, Trusted Shops and Zalando use LeanIX Enterprise Architecture Management tool.
Free Trial: http://bit.ly/LeanIXFreeTrial
Slides accompanying a presentation on Dropwizard I gave at the DevIgnition conference ( www.devignition.com ) on April 29, 2016. The sample code is on GitHub at https://github.com/sleberknight/dropwizard-devignition-2016
It is widely understood that our software needs to become reactive; we need to consider responsiveness, maintainability, elasticity and scalability from the outset. Not all systems need to implement all these to the same degree, as specific project requirements will determine where effort is most wisely spent. But, in the vast majority of cases, the need to go reactive will demand that we design our applications differently.
In this presentation Dr. Roland Kuhn will explore several architecture elements that are commonly found in reactive systems, like the circuit breaker, various replication techniques, and flow control protocols. These patterns are language agnostic and also independent of the abundant choice of reactive programming frameworks and libraries. They are well-specified starting points for exploring the design space of a concrete problem: thinking is strictly required!
This webinar is based off of Dr. Kuhn’s session, Reactive Design Sessions, presented at WJAX and Code Mesh.
Patterns for building resilient and scalable microservices platform on AWSBoyan Dimitrov
In this talk we explore Hailo's H2 platform under the hood taking a peek into the orchestration layer and introducing various patterns for building scalable and resilient microservices platform. We share insights about our architecture and how it evolved into a cloud agnostic self-managed system.
VISUG - Approaches for application request throttlingMaarten Balliauw
Speaking from experience building a SaaS: users are insane. If you are lucky, they use your service, but in reality, they probably abuse. Crazy usage patterns resulting in more requests than expected, request bursts when users come back to the office after the weekend, and more! These all pose a potential threat to the health of our web application and may impact other users or the service as a whole. Ideally, we can apply some filtering at the front door: limit the number of requests over a given timespan, limiting bandwidth, ...
In this talk, we’ll explore the simple yet complex realm of rate limiting. We’ll go over how to decide on which resources to limit, what the limits should be and where to enforce these limits – in our app, on the server, using a reverse proxy like Nginx or even an external service like CloudFlare or Azure API management. The takeaway? Know when and where to enforce rate limits so you can have both a happy application as well as happy customers.
Integrate Solr with real-time stream processing applicationsthelabdude
Storm is a real-time distributed computation system used to process massive streams of data. Many organizations are turning to technologies like Storm to complement batch-oriented big data technologies, such as Hadoop, to deliver time-sensitive analytics at scale. This talk introduces on an emerging architectural pattern of integrating Solr and Storm to process big data in real time. There are a number of natural integration points between Solr and Storm, such as populating a Solr index or supplying data to Storm using Solr’s real-time get support. In this session, Timothy will cover the basic concepts of Storm, such as spouts and bolts. He’ll then provide examples of how to integrate Solr into Storm to perform large-scale indexing in near real-time. In addition, we'll see how to embed Solr in a Storm bolt to match incoming tuples against pre-configured queries, commonly known as percolator. Attendees will come away from this presentation with a good introduction to stream processing technologies and several real-world use cases of how to integrate Solr with Storm.
Speaking from experience building MyGet.org: users are insane. If you are lucky, they use your service, but in reality, they probably abuse. Crazy usage patterns resulting in more requests than expected, request bursts when users come back to the office after the weekend, and more! These all pose a potential threat to the health of our web application and may impact other users or the service as a whole. Ideally, we can apply some filtering at the front door: limit the number of requests over a given timespan, limiting bandwidth, ...
In this talk, we’ll explore the simple yet complex realm of rate limiting. We’ll go over how to decide on which resources to limit, what the limits should be and where to enforce these limits – in our app, on the server, using a reverse proxy like Nginx or even an external service like CloudFlare or Azure API management. The takeaway? Know when and where to enforce rate limits so you can have both a happy application as well as happy customers.
Threads are lightweight processes as the overhead of switching between threads is less
Synchronization allows only one thread to perform an operation on a object at a time.
Synchronization prevent data corruption
Thread Synchronization-The synchronized methods define critical sections.
You will learn the Deadlock Condition in Threads and Syncronization of Threads
Simple REST-APIs with Dropwizard and SwaggerLeanIX GmbH
During the VOXXED Days in Berlin on 29 January 2016 Bernd Schönbach from LeanIX demonstrated an easy way to create well documented and implemented REST-APIs using the Dropwizard Library for the implementation and Swagger for easy Documentation.
===
LeanIX offers an innovative software-as-a-service solution for Enterprise Architecture Management (EAM), based either in a public cloud or the client’s data center.
Companies like Adidas, Axel Springer, Helvetia, RWE, Trusted Shops and Zalando use LeanIX Enterprise Architecture Management tool.
Free Trial: http://bit.ly/LeanIXFreeTrial
Slides accompanying a presentation on Dropwizard I gave at the DevIgnition conference ( www.devignition.com ) on April 29, 2016. The sample code is on GitHub at https://github.com/sleberknight/dropwizard-devignition-2016
It is widely understood that our software needs to become reactive; we need to consider responsiveness, maintainability, elasticity and scalability from the outset. Not all systems need to implement all these to the same degree, as specific project requirements will determine where effort is most wisely spent. But, in the vast majority of cases, the need to go reactive will demand that we design our applications differently.
In this presentation Dr. Roland Kuhn will explore several architecture elements that are commonly found in reactive systems, like the circuit breaker, various replication techniques, and flow control protocols. These patterns are language agnostic and also independent of the abundant choice of reactive programming frameworks and libraries. They are well-specified starting points for exploring the design space of a concrete problem: thinking is strictly required!
This webinar is based off of Dr. Kuhn’s session, Reactive Design Sessions, presented at WJAX and Code Mesh.
Patterns for building resilient and scalable microservices platform on AWSBoyan Dimitrov
In this talk we explore Hailo's H2 platform under the hood taking a peek into the orchestration layer and introducing various patterns for building scalable and resilient microservices platform. We share insights about our architecture and how it evolved into a cloud agnostic self-managed system.
VISUG - Approaches for application request throttlingMaarten Balliauw
Speaking from experience building a SaaS: users are insane. If you are lucky, they use your service, but in reality, they probably abuse. Crazy usage patterns resulting in more requests than expected, request bursts when users come back to the office after the weekend, and more! These all pose a potential threat to the health of our web application and may impact other users or the service as a whole. Ideally, we can apply some filtering at the front door: limit the number of requests over a given timespan, limiting bandwidth, ...
In this talk, we’ll explore the simple yet complex realm of rate limiting. We’ll go over how to decide on which resources to limit, what the limits should be and where to enforce these limits – in our app, on the server, using a reverse proxy like Nginx or even an external service like CloudFlare or Azure API management. The takeaway? Know when and where to enforce rate limits so you can have both a happy application as well as happy customers.
Integrate Solr with real-time stream processing applicationsthelabdude
Storm is a real-time distributed computation system used to process massive streams of data. Many organizations are turning to technologies like Storm to complement batch-oriented big data technologies, such as Hadoop, to deliver time-sensitive analytics at scale. This talk introduces on an emerging architectural pattern of integrating Solr and Storm to process big data in real time. There are a number of natural integration points between Solr and Storm, such as populating a Solr index or supplying data to Storm using Solr’s real-time get support. In this session, Timothy will cover the basic concepts of Storm, such as spouts and bolts. He’ll then provide examples of how to integrate Solr into Storm to perform large-scale indexing in near real-time. In addition, we'll see how to embed Solr in a Storm bolt to match incoming tuples against pre-configured queries, commonly known as percolator. Attendees will come away from this presentation with a good introduction to stream processing technologies and several real-world use cases of how to integrate Solr with Storm.
Speaking from experience building MyGet.org: users are insane. If you are lucky, they use your service, but in reality, they probably abuse. Crazy usage patterns resulting in more requests than expected, request bursts when users come back to the office after the weekend, and more! These all pose a potential threat to the health of our web application and may impact other users or the service as a whole. Ideally, we can apply some filtering at the front door: limit the number of requests over a given timespan, limiting bandwidth, ...
In this talk, we’ll explore the simple yet complex realm of rate limiting. We’ll go over how to decide on which resources to limit, what the limits should be and where to enforce these limits – in our app, on the server, using a reverse proxy like Nginx or even an external service like CloudFlare or Azure API management. The takeaway? Know when and where to enforce rate limits so you can have both a happy application as well as happy customers.
Threads are lightweight processes as the overhead of switching between threads is less
Synchronization allows only one thread to perform an operation on a object at a time.
Synchronization prevent data corruption
Thread Synchronization-The synchronized methods define critical sections.
You will learn the Deadlock Condition in Threads and Syncronization of Threads
This talk is an introduction to quantum cryptography and cryptanalysis: the physics and mathematics behind how quantum computers provide unique opportunities and threats to traditional cryptographic systems. We will review the basics behind quantum mechanics and quantum computers, why quantum computers pose a unique threat to cryptographic systems and what secure infrastructure systems must do to protect secrets in a post-quantum world.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
2. @chbatey
Who is this guy?
● Enthusiastic nerd
● Senior software engineer at BSkyB
● Builds a lot of distributed applications
● Apache Cassandra MVP
3. @chbatey
Agenda
1. Setting the scene
○ What do we mean by a fault?
○ What is a microservice?
○ Monolith application vs the micro(ish) service
2. A worked example
○ Identify an issue
○ Reproduce/test it
○ Show how to deal with the issue
6. But different things go wrong...
@chbatey
down
slow network
slow app
2 second max
GC :(
missing packets
7. 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
8. Time for an example...
● All examples are on github
● Technologies used:
@chbatey
○ Dropwizard
○ Spring Boot
○ Wiremock
○ Hystrix
○ Graphite
○ Saboteur
9. Example: Movie player service
@chbatey
Shiny App
User
Service
Device
Service
Pin
Service
Shiny App
Shiny App
Shiny App
User
Se rUvisceer
Service
Device
Service
Play Movie
19. Wiremock + Saboteur + Vagrant
● Vagrant - launches + provisions local VMs
● Saboteur - uses tc, iptables to simulate
@chbatey
network issues
● Wiremock - used to mock HTTP
dependencies
● Cucumber - acceptance tests
20. I can write an automated test for that?
@chbatey
Vagrant + Virtual box VM
Wiremock
User Service
Device Service
Pin Service
Sabot
eur
Play
Movie
Service
Acceptance
Test
prime to drop traffic
reset
23. Implementing reliable timeouts
● Homemade: Worker Queue + Thread pool
@chbatey
(executor)
● Hystrix
● Spring Cloud Netflix
24. A simple Spring RestController
@chbatey
@RestController
public class Resource {
private static final Logger LOGGER = LoggerFactory.getLogger(Resource.class);
@Autowired
private ScaryDependency scaryDependency;
@RequestMapping("/scary")
public String callTheScaryDependency() {
LOGGER.info("RestContoller: I wonder which thread I am on!");
return scaryDependency.getScaryString();
}
}
25. Scary dependency
@chbatey
@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!");
if (System.currentTimeMillis() % 2 == 0) {
return "Scary String";
} else {
Thread.sleep(10000);
return "Really slow scary string"; }
}
}
26. All on the tomcat thread
13:07:32.814 [http-nio-8080-exec-1] INFO info.batey.
examples.Resource - RestContoller: I wonder which thread
I am on!
13:07:32.896 [http-nio-8080-exec-1] INFO info.batey.
examples.ScaryDependency - Scary dependency: I wonder
which thread I am on!
@chbatey
27. Seriously this simple now?
@chbatey
@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!");
if (System.currentTimeMillis() % 2 == 0) {
return "Scary String";
} else {
Thread.sleep(10000);
return "Really slow scary string";
}
}
}
28. What an annotation can do...
13:07:32.814 [http-nio-8080-exec-1] INFO info.batey.
examples.Resource - RestController: I wonder which
thread I am on!
13:07:32.896 [hystrix-ScaryDependency-1] INFO info.
batey.examples.ScaryDependency - Scary Dependency: I
wonder which thread I am on!
@chbatey
29. Timeouts take home
● You can’t use network level timeouts for
@chbatey
SLAs
● Test your SLAs - if someone says you can’t,
hit them with a stick
● Scary things happen without network issues
31. Complexity
● When an application grows in complexity it
will eventually start sending emails
@chbatey
32. Complexity
● When an application grows in complexity it
will eventually start sending emails contain
queues and thread pools
@chbatey
33. Don’t try if you can’t succeed
● Executor Unbounded queues :(
○ newFixedThreadPool
○ newSingleThreadExecutor
○ newThreadCachedThreadPool
● Bound your queues and threads
● Fail quickly when the queue /
@chbatey
maxPoolSize is met
● Know your drivers
34. This is a functional requirement
● Set the timeout very high
● Use wiremock to add a large delay to the
@chbatey
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?
42. 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
@chbatey
max connections?
43. So easy with Dropwizard + Hystrix
@Override
public void initialize(Bootstrap<AppConfig> appConfigBootstrap) {
HystrixCodaHaleMetricsPublisher metricsPublisher
= new HystrixCodaHaleMetricsPublisher(appConfigBootstrap.getMetricRegistry())
HystrixPlugins.getInstance().registerMetricsPublisher(metricsPublisher);
@chbatey
}
metrics:
reporters:
- type: graphite
host: 192.168.10.120
port: 2003
prefix: shiny_app
44. 5 - Don’t whack a dead horse
@chbatey
Shiny App
User
Service
Device
Service
Pin
Service
Shiny App
Shiny App
Shiny App
User
Se rUvisceer
Service
Device
Service
Play Movie
45. What to do..
● Yes this will happen..
● Mandatory dependency - fail *really* fast
● Throttling
● Fallbacks
@chbatey
47. Implementation with Hystrix
@chbatey
@GET
@Timed
public String integrate() {
LOGGER.info("I best do some integration!");
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);
}
48. Implementation with Hystrix
public class PinCheckDependency extends HystrixCommand<Boolean> {
@chbatey
@Override
protected Boolean run() throws Exception {
HttpGet pinCheck = new HttpGet("http://localhost:9090/pincheck");
HttpResponse pinCheckResponse = httpClient.execute(pinCheck);
String pinCheckInfo = EntityUtils.toString(pinCheckResponse.getEntity());
return Boolean.valueOf(pinCheckInfo);
}
}
49. Implementation with Hystrix
public class PinCheckDependency extends HystrixCommand<Boolean> {
@chbatey
@Override
protected Boolean run() throws Exception {
HttpGet pinCheck = new HttpGet("http://localhost:9090/pincheck");
HttpResponse pinCheckResponse = httpClient.execute(pinCheck);
String pinCheckInfo = EntityUtils.toString(pinCheckResponse.getEntity());
return Boolean.valueOf(pinCheckInfo);
}
@Override
public Boolean getFallback() {
return true;
}
}
50. 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
51. 6 - Turn off broken stuff
● The kill switch
@chbatey
52. 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
57. Hystrix metrics
● Failure count
● Percentiles from Hystrix
@chbatey
point of view
● Error percentages
58. How to test metric publishing?
● Stub out graphite and verify calls?
● Programmatically call graphite and verify
@chbatey
numbers?
● Make metrics + logs part of the story demo