O'Reilly logo

Scalable Cloud Ops with Fugue by Josha Stella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Refactoring Refuge with Modules

Our previous work in the Refuge composition has kept a lot of functionality expanded in our chapter files, which is getting a bit unwieldy. Let’s see if we can move the Refuge-specific types and functions we’ve defined into their own modules to simplify the composition and make our Refuge-specific patterns easier to reuse.

A Refuge-Specific Load Balancer

We’ll start with the loadbalancer function we defined in Chapter 6, Understanding Ludwig. Our first step is to copy the definition of loadbalancer out to its own file. Remember that the file name determines the module name, so we need to consider what we want our module to be called. Given that these are Refuge-specific modules, it makes sense to stick everything ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required