If you run a website or app on Google Cloud and you’re using their Application Load Balancer to distribute traffic but wish you had a way to:

  • Add or modify HTTP headers: Insert new headers for specific customers. Or re-write client headers on the way to the back end.
  • Implement custom security rules: Add your own logic to block malicious requests or filter sensitive data.
  • Perform custom logging: Log user-defined headers or other custom data into Cloud Logging or other tools.
  • Rewrite HTML on the fly: Dynamically adjust your website content based on user location, device, etc
  • Script Injection: Rewrite HTML for integration with Analytics or reCAPTCHA

Traditionally, you’d have to achieve this by setting up separate proxy servers or modifying your app. With Service Extensions, you can do all this directly within your Application Load Balancer.

How Service Extensions work:

  • They are  mini apps: Service Extensions are written in WebAssembly (Wasm), these are super fast, and secure.
  • They run at the edge: This means they on the load balancer, reducing any potential impact to latency.
  • They’re fully managed: Google Cloud takes care of all the hard parts.
 Why would anyone use Service Extensions?
  • Flexibility: Tailor your load balancer to your specific needs without complex workarounds.
  • Performance: Improve response times by processing traffic at the edge.
  • Security: Enhance your security posture with custom rules and logic.
  • Efficiency: Reduce operational overhead by offloading tasks to the load balancer.

How to get started:

  1. Check the docs from Google, start with Service Extensions Overview then Plugins Overview and How to create a plugin finally some Code Samples
  2. Also definitely worth checking out WASM if you have not already at https://webassembly.org/

Service Extensions sit in the Cloud Load Balancing processing path. 

Image to the left shows this.

Author: benking

Ben is the managing director and founder @ Aviato Consulting. Ben is a passionate technologist with over 17 years experience working to help transform some of the worlds largest organizations with technology, with experience working across both APAC, and EMEA in multiple industries. He is the founder of a startup with a successful exit, an Army veteran, recreational pilot, startup advisor, and board member. Ben is based in Sydney, Australia.

Leave a Reply

Your email address will not be published.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

Aviato Consulting unleash the best of Google technology on your business problems.

Founded by ex-Google Cloud Consultant, and leaders to help you revolutionise your industry.

Contact us
Book a meeting, or follow us on socials below.

Australia, Aviato Consulting Pty Ltd, 59 Parry St, Newcastle 2300 +61 2 6188 9111

@2024 copyright by aviato consulting. all rights reserved