Tutorials:

Architecting Reactive Systems for Scalability and Availability

01 Nov 2021
09:00 - 13:00
Francesco Cesarini

Learn how to architect fault-tolerant, scalable, soft, real-time systems with requirements for high availability.

In this tutorial, we will look at the steps needed to design scalable and resilient systems. The lessons learnt apply to the Erlang ecosystem, Elixir included, but are in fact technology agnostic and could be applied to most stacks, including Scala/AKKA, .net and others.

It has to be event driven and react to external stimulus, load, and failure. It must always be responsive. You have heard many success stories that suggest Erlang is the right tool for the job. And indeed it is—but while Erlang is a powerful programming language, on its own, it’s not enough to group these features together and build complex reactive systems. To get the job done correctly, quickly, and efficiently, you also need middleware, reusable libraries, tools, design principles, and a programming model that tells you how to architect and distribute your system.

 

EXPERTISE

Intermediate

 

TARGET AUDIENCE

Software Developers and architects

 

DURATION

3,5 hours

 

PREREQUISITES

Software development experience is a must, as is the understanding of data consistency models. Experience or exposure to designing and architecting systems is a benefit, but not a prerequisite.

OBJECTIVES

We will focus on:

  • Distribution: This section covers how to break up your system into manageable microservices. How do you collect these micro services into nodes, which together form distributed architectural patterns, giving you your end-to-end system? What network connectivity do you use to let them communicate with each other?
  • Interfaces and state: This section covers how you define your service interfaces. What data and state do you distribute across your nodes, clusters, and data centers? And if requests fail across nodes, what is your recovery strategy?
  • Availability: You need at least two computers to make a fault-tolerant system. When dealing with fault tolerance, you have to make decisions about resilience and reliability. This section covers techniques needed to make sure your system never fails and the trade-offs you need to make in your design.
  • Scalability: When you picked your distributed pattern, decided how to distribute your data, and made choices on fault tolerance, resilience, and reliability, you also made trade-offs on scalability. This section covers the decisions you have to make and how they affect scalability, as well as how to deal with capacity planning, load regulation, and back pressure.
  • Observability: This section covers the importance of visibility on both a business level and a system level. To achieve five-nines availability, you need preemptive support and automation. To trigger automation, you need to know the state of your system and be able to react to it as quickly as possible. This includes metrics, alarms, and notifications.

The tutorial is based on the last four chapters of Designing for Scalability with Erlang/OTP by Francesco Cesarini.

The BEAM VM under the hood

08 Nov 2021
09:00 - 17:00
Dmytro Lytovchenko

A guide for operations and development teams Everything you wanted to know about the BEAM but were afraid to ask. Through examples and hands on exercises, we will showcase how to manage the BEAM VM in operational environments, optimizing for memory utilisation and performance when using Erlang or Elixir.

 

OBJECTIVES

Understand how the BEAM works under the hood Fine-tune it and optimize its settings for throughput and memory use.

 

PREREQUISITES

Experience in developing and supporting languages running on the BEAM including Erlang and Elixir.

 

TARGET AUDIENCE

The course is aimed at experienced developers and devops engineers, helping them pre-empt and address behaviour which arise as the result of VM specific settings, be it disruption of soft real time properties as a result of garbage collection or bottlenecks in the scheduler.

COURSE OUTLINE

Intro to the BEAM

The highlights of the BEAM Virtual Machine, highlighting the features which make it stand out in comparison to other VMs.

Processes under the hood

Explore at processes, how memory is allocated, managed and garbage collected. We look at some of the bottlenecks in the BEAM caused by concurrency, describe how they manifest themselves, and how to avoid them.

The Process Scheduler

Understand how the schedulers work, how it scales on multi-core architectures and what its limitations are. We cover how the run queues can be monitored and manipulated, and how process priorities can backfire.

Memory Management

In this section, we look at different memory types including system, atom, binary, code and ets tables. We will cover how (and why) you should monitor memory, and how issues can arise. We will also cover how the garbage collector works, focusing if, and when optimizations are necessary.

Tweaking and fine-tuning

How can the BEAM VM be tweaked and what possible areas for fine-tuning are available to you? We'll look at some of the most obscure flags which can come in hand, allowing for specific optimisations on a VM level, be it to increase I/O or throughput in virtualized environments.