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

kidrobin's avatar

Best Solution to work on a Hosting Service

Hi, i've been developing a web application in Laravel where you send digital greeting cards for users and "honor badges", the user always gets notified via email whenever they get one (the purpose of the greeting cards is to be sent via email).

Sadly, since the domain and hosting service was already bought by the company i'm working on, i've been adapting this application to run on a hosting service, but things like sending emails or multiple posts into the database make the application really slow, and it's meant to work with at least 40,000 users.

What could be a "cheap" solution to make this application as efficient as possible.

0 likes
12 replies
cameronscott137's avatar

Ooof, you mean like a $9.95/mo shared hosting service? That's tough. Couple of questions:

  1. You're definitely stuck using that hosting system? There's no way you can set up a subdomain and point it to a solution better suited to your app?

  2. When you say it makes the app really slow, you're talking about the speed with which that action is performed? For example, I click a button that says "send email," and the response time is super slow? Or is the app slow even for non-intensive actions (logging in/out, clicking to different views, etc.)?

katifrantz's avatar

I think the cheapest , and most efficient and scalable would be to host on a cloud server , with Digital Ocean, Linode, Vultr, Amazon etc . Then you can just map the domain to point to this server .

Snapey's avatar

as @maitrefrantz says, don't assume that the hosting has to go with the domain name. most domain providers will allow you to edit the dns and point the domain to any provider.

Also, don't worry about scaling until you have significant number of users. it always easier to sell an upgrade to a client whose site is growing and that your initial warnings are proving to be correct.

also, the number of users is only of any significance if you consider concurrency.

kidrobin's avatar

@Snapey I'm concerned that we could only use the domain name, but since i'm not the PM in this project but i'm the only developer, i can't make "budget choices" and since they acquired the domain name and service before i got in i really don't have much of a choice but keep with the service.

kidrobin's avatar

@cameronscott137 Precisely a $9.95/mo hosting service all budget choices where made before i got here, and i'm currently the only developer in the area/team.

1.- Right now yes, at least until the application gets enough promotion in the entire company and receives positive feedback , they have an internal server that i could use, but since they want the app to go www messing with ssl certificates and public ip's would be a mess (i'm in Mexico and the server is in baltimore i believe).

2.- When i mean really slow i mean 20-30 seconds on average to submit a post ( the app sends an email with a greeting card for every user you include, so naturally it gets slower for every email it has to send).

kidrobin's avatar

@maitrefrantz I told them about using a cloud service (mostly because i'll need to adjust some server settings at some point) , but they already aquired a 2 year plan for this hosting service, since i'm not the PM right now all i can do is set the app to our resources until we get enough positive feedback about the app.

katifrantz's avatar

@kidrobin, I'm sorry you are in this situation . But what I always do when I encounter such challenges is to place all options on deck for the clients to choose . Tell them you are not the cause of the slow response , tell them the cause , and the solution . If they are not willing to make the sacrifice of switching hosts, then they should use the site as it is . Unfortunately , even if you queue the emails and send asynchronously , and by some magic you can run workers on your current hosting plan, your users might receive their mails 25 - 30 minutes late .

kidrobin's avatar

@maitrefrantz Sorry for replying this late.

But just like you said, since the beginning i told them it was a bad idea to host the application on a regular hosting service (they now want that an user can send multiple emails to multiple users at once lol ), but my immediate solution is to handle all email logic with another server like mailgun, would that be enough to run the application faster ?

kidrobin's avatar

@cameronscott137 Well, at my level of expertise i don't think i'll be able to handle all the queue logic, with a server i can't manipulate and with no option for a paid solution, so yes the email is fired in real time.

katifrantz's avatar

What's the situation like now ? It would become more difficult as time goes by because soon enough server resources would need to be scaled as need arises . I suggest you take out a few hours and master the queue in laravel . This would solve most of your problems . If not , switch hosting , and read about Laravel forge .

Please or to participate in this conversation.