Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tomybyte's avatar

Starting point (Framework) for building an API based Web App

For a while now I'm checking how to start a new project that has to offer an API access to a special service (making specific calculations on given data). This is the critical part, because the api requests should be working almost in real time and the number of simultaneous API calls might be getting very high, up to 100k. I'm not sure, whether Laravel will be the right choice for this, but building all from scratch with pure PHP is not what I want. I would like to use Laravel, but I've seen many performance tests with a lot of frameworks including Laravel and Laravel allways was the slowest of all. So my question, if I will use Laravel to offer this API based service, which pathway should I take to do it right, while keeping the performance in mind?

Regards, Tom

0 likes
4 replies
tomybyte's avatar

I am wondering, whether the separation of concerns could be a solution for me. So I could build only the performace critical API parts in Python/FastAPI and all others with PHP/Laravel. But that means I have to learn Python and FastAPI. But this way I would solve the performance problem.

tisuchi's avatar

@tomybyte My opinion (without knowing more details about the project), use Python if you are familiar since no matter what, you need to use it for real-time/performance.

There is no point in using Laravel & Python for a single API project.

tomybyte's avatar

@tisuchi - thank you for your reply. So you think it is not a good idea only creating the pure performance critical part in Python/FastAPI and all the others in PHP/Laravel? I have to create a frontend for the users of the API based web service, with login to have a place where they can create ther API keys, pay for the access to the API, get their bills and so on. For this I would have to take another framework in Python anyway, so I thought I could do this with Laravel and maybe Livewire. What do you think?

tisuchi's avatar

@tomybyte

TLDR; Use Python for the whole API project.

My point is, there is no benefit to using two languages to build an API app. My strong suggestion would be to choose any language that is suitable for you.

If you feel that there might be some complexity that requires Python on the Laravel project, I suggest using Python for the whole project.

Please or to participate in this conversation.