Writing resilient code
summary
Covers techniques for making Laravel applications resilient to traffic spikes, flaky networks and failing third-party APIs by using robust input validation and sanitisation, safer error handling that avoids leaking sensitive info, and monitoring with tools like Sentry or Flare plus alerting. Walks through concrete practices such as using Laravel’s retry helper for quick recovery, graceful degradation and cached fallbacks when remote APIs fail, and testing edge cases and simulated outages (including expired caches) to catch non-happy-path failures.
AI-written summary · about
chapters (17)
- 0:00Start
- 4:41Larabelles as a non profit, how it supports marginalised genders and a call for sponsors and allies
- 5:07From human resilience vs confidence to defining resilient code and different kinds of stress on our apps
- 7:12Users are creative and unpredictable, never trusting input, and introducing input validation and sanitisation
- 9:47Naughty users, and the importance of only using validated data
- 10:03Error handling that does not crash the application, avoids default error pages and protects sensitive information while keeping users informed
- 12:13Monitoring and logging for resilient code, using tools like Sentry and Flare, and logging context developers will actually need later
- 13:42Adding alerts so errors do not fail silently, being proactive instead of waiting for users to complain
- 14:40Quick error recovery, retries with Laravel’s retry helper, and accounting for users with bad connectivity
- 15:57Graceful degradation so one broken feature does not break everything
- 18:05Expecting third party APIs to fail
- 19:01Showing cached data when a remote API is down
- 19:35Testing edge cases, going beyond the happy path
- 20:25Simulating outages and expired caches in tests
- 21:41Putting yourself in the user’s shoes, asking non developers to try the app
- 22:13Resilient code checklist recap
- 23:07Final thanks
related talks
36mLiving peacefully with Laravel
40mCrafting Elegant APIs with Laravel
40mEngineering Complex Applications with Laravel 4
21mSoftware Design Patterns in Laravel 4
28mTaking Laravel to the edge with HTTP caching & Varnish
40mLaravel in 2018
31mModern PHP development with Laravel 5.6
44mAbusing Laravel for Fun and Profit
