Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Extending NGINX with (m)ruby

Tyler J Diaz
September 18, 2017

Extending NGINX with (m)ruby

NGINX modules are typically written in C or Lua. Is there a performant way we can gain the elegance of Ruby without learning a new language? mRuby leads the way.

Tyler J Diaz

September 18, 2017
Tweet

Other Decks in Programming

Transcript

  1. Some details about me Github: @tylerdiaz YCombinator founder ✈ Love

    to travel " Programming since 12 # From Puerto Rico ⚒ Backend generalist 
 at Strikingly
  2. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application.
  3. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application. • Cache – Extremely efficient caching layer.
  4. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application. • Cache – Extremely efficient caching layer. • Resilience – Mitigate Denial of Service with rate limiting.
  5. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application. • Cache – Extremely efficient caching layer. • Resilience – Mitigate Denial of Service with rate limiting. • HTTPS – Attach an SSL cert (https://letsecure.me/)
  6. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application. • Cache – Extremely efficient caching layer. • Resilience – Mitigate Denial of Service with rate limiting. • HTTPS – Attach an SSL cert (https://letsecure.me/) • Service Routing – Complete a feature in a different application setup by a different team.
  7. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application. • Cache – Extremely efficient caching layer. • Resilience – Mitigate Denial of Service with rate limiting. • SSL – Serve HTTPS by attaching a certificate via NGINX • Service Routing – Complete a feature in a different application setup by a different team. • Logging – Track your 404s. Useful for understanding a new application stack by analyzing the request/responses.
  8. What can NGINX do? • Load Balance – Route a

    request over multiple running versions of your application. • Cache – Extremely efficient caching layer. • Resilience – Mitigate Denial of Service with rate limiting. • SSL – Serve HTTPS by attaching a certificate via NGINX • Service Routing – Complete a feature in a different application setup by a different team. • Logging – Track your 404s. Useful for understanding a new application stack by analyzing the request/responses. • Access Control – Restrict access to a service by IP.
  9. • Advanced caching layer • Automatically provision and manage SSL

    certificates • High availability • Inline critical CSS
  10. Limitations • No access to the existing ruby gem ecosystem.

    • 1.9.3 syntax (named parameters coming soon!) • Can’t require files, so your code might get repetitive.