Are you caching cacheable responses? Might consider a proxy cache for those cacheable endpoints that would skip the app entirely.
Project API are taking too much load on server
Recently developed one project for company and in live testing of 2000 users we found that server is taking too much load. We investigated it and improved server configuration but still problem remains. Is it because there is problem with the approach of my coding?
I have used service classes approach for developing api in laravel. so my controllers are slim, models are also slim, but service classes are fat. and i have used passport for communication with React js front end.
I have used defferable providers for registering my service classes.
Ex: public function register() { $this->app->singleton(Admin::class, function ($app) { return new Admin(Auth::user()); }); }
I have also used Collection resources liberally to create resources in api. just wanted to ask is it a bad practice to follow if application is going to have too many hits in specific time interval?
Please or to participate in this conversation.