Building, testing and scaling Laravel APIs effectively.

Building, testing and scaling Laravel APIs effectively.

The building, testing, and scaling of APIs in Laravel is not as simple as it seems. Should you use Laravel or Lumen? How should you authenticate the API? How should you test, deploy and scale your API? CI or not? Performance testing? This talk aims at answering all these questions. How and why to use Laravel and not Lumen, how to modify pieces of Laravel effectively for APIs, how to improve API performance and scale with increased traffic.

Db8cae6201e0cf535406e6c78e603ede?s=128

Kati Frantz

November 16, 2019
Tweet

Transcript

  1. 4.

    Lumen tradeoffs Developer experience - Lack of many artisan commands

    Auth features - No password resets / registration / login App features - Notifications / Broadcasts / Scheduling Community support - Packages / Resources / Tutorials
  2. 7.

    Graphql vs Rest Network performance Complex systems / Microservices Learning

    curve Web caching / File uploads Laravel features
  3. 9.

    Cleanup Laravel for APIs Remove all cookies / session related

    middleware Remove unused providers and aliases Cleanup unused routes Cleanup dead code / files
  4. 11.

    Testing TDD all the things More and more integration tests

    Unit tests for models and helpers Leverage laravel testing helpers (assertCreated, assertJson, assertJsonStructure, assertJsonFragment, postJson etc etc)
  5. 12.

    Deployment Don’t use shared hosting Use Laravel forge / Cloudways

    / Runcloud Use Amazon RDS / Aurora / Google Cloud SQL Use a CI / CD pipeline.
  6. 14.

    Scaling Use a load balancers with multiple servers Go serverless

    with Laravel Vapor Dockerise all the things