Foreword
The language I used when I first tried programming was php, and I have worked in several companies that use php as the main development language. However, I don't turn a blind eye to other languages, and php is no longer my main development language.
I think I am a person who can be happy because "you don't need to worry too much about language design" and "make money quickly and get work done as easily as possible". I recently left a full-time job where I was primarily working on PHP as a front-end developer.
Recently I read through the blog post "Eevee.PHP: The Debris of Bad Design" that is old but still evokes such real pain that I can no longer ignore it. However, I hit some roadblocks and this is my story about the hard times I had after not using php.
Economic Issues of Working on Free Time Projects
I am free. I don't have to write a line of php code if I don't want to; I no longer have to do backend development work; and, unless the browser crashes due to some catastrophic change, I won't have to for the foreseeable future Do the work.
However, I do have a bunch of projects that I want to plan to build and make happen, more than just one. I'm actually trying to get some satisfying passive income (untaxed income) by building a bunch of smaller websites. (That's my goal anyway) To do this, I launched my first unnamed website yesterday.
Unfortunately, because this is a self-funded project and I need to build a lot of sites, I have to give up some things directly. Below I'll list them, explain why I believe my hosting provider won't work for me, and talk about others who are in the same predicament as me.
Heroku
If I had money, I would put all my applications on heroku. In my experience, Heroku has been incredible. Hosting and configuring your own environment is effortless, it doesn't matter what language you use, and so on.
The problem with using Heroku is its charging model. Although $7 per project per month does not seem like much, when you have many projects, the cost goes up like a rocket. Even with just ten apps, $70 a month is too much for something that may not lead to any results.
The costs above don’t even take into account the use of a database, which is an additional $9 per 10 million rows of data. If a project has a lot of data traffic, it will also increase the cost of the application, and soon we will find that the monthly cost becomes more than a hundred dollars.
Amazon web services
The price of AWS seems cheaper, but I always think that using it will increase complexity in many aspects, and the configuration and cost will also increase the cost. For a small website with only a few hundred visits per month Quite not worth it.
I can’t say I have a lot of experience using AWS, but everything about it has a strong enterprise flavor, and I believe customers with complex applications are their focus.
Perhaps it is worth learning how to deploy on AWS efficiently, but how to deploy git service simply? Do I need additional services for it? Can the same instance run multiple applications? What is the charging model like? Despite looking at their pricing page, I still don't understand which part is relevant to me. After reading their website, I still have a lot of questions in my mind that I can't find answers to.
Microsoft Azure
At first glance, Microsoft’s Azure seems to be the savior. However, even though I really want to deploy large applications here, I still have one concern, and that is about Google and HTTPS.
If you take a look at their pricing model, you should be able to understand (the picture is quoted from my homepage, sorry for the Swedish language~), and it is wisest to look for these. If you choose the Standard Edition, from what I've heard you can deploy up to 50 applications on it. In my case, I almost have to choose the standard version. 580 kronor per month, equivalent to about 70 U.S. dollars. Although it is still a bit expensive, the features I like on Heroku are also available here, so it is worth it. Of course, Azure is a little more complicated and has frequent price fluctuations, but its flaws are not outweighed.
The problem is that the standard version described in the pricing model only supports 5 SNI (Server Name Indication). What does this mean? According to my understanding, only 5 sites support SSL. In view of the fact that Google has become increasingly unfriendly to sites that do not support SSL, and the Let's Encrypt project has enabled every website to use HTTPS encryption, only 5 of my 50 sites have SSL support. , this is really not good. The above is just my personal understanding, and the instructions it provides are somewhat sparse, so it is possible that I have misunderstood it. In fact, I do hope that I am wrong. If so, please reply to me in the comment box below the article.
GleSYS, Digital Ocean, Linode own server, etc.
Using this money to rent a VPS from one of the service providers listed above is the only real alternative. The good thing about GleSYS is that it has a Swedish host available, which means low latency and no risk of the data passing US government scrutiny. I can safely store user data there.
Compared to hosting services, the price is incredibly low, but it does take some time to configure. You have to complete all the settings and organization yourself, which is a lot of work. The biggest reason why I choose a hosting service is because if one of my services goes down while I am at work, I have to wait until I get home from get off work to deal with these things, which may take seven or eight hours. That’s a matter for the future.
The PHP community provides solutions
While Eevee complained about the lack of unique features of the PHP language, the community has come up with the coolest hosting solution I have ever tried. It also happens to be the cheapest I've ever tried.
The solution is Laravel Forge.
If you don’t have immediate access to this link, let me explain it to you. For $9 a month, Laravel Forge provides unlimited production-grade PHP servers (installation, setup, and configuration), and you can control all services from a single web interface. Even more amazing is that I can target any VPS provider, even the simplest AWS or Digital Ocean. This will help you scale your server, set up cron jobs, edit environment configurations, deploy using git push, and more.
The Laravel Forge service gives me the nice feature of unlimited number of applications with Azure or HeroHu (as long as the VPS can handle it). Laravel Forge is not limited to the Laravel framework, any PHP application will do.
Like Eevee, if this article doesn't improve your perception of the PHP community, nothing will. But seriously, how could someone who knew this leave such a great service?
Profit is important
I think my story is very common. I don't think I'm alone. There must be thousands of small business owners in the world who need to host their applications. Either their project happens to be a website.
A $10 server from Linode and a $9 Laravel Forge, they are fast and cheap to deploy, so the server built in this way can quickly replace any assumptions, you will not want to do operation and maintenance work, including server startup , run, install the certificate and other tasks.
I looked for answers on the web, but the only convincing alternative was to use a Continuous Integration service like Codeship. While it's not unlimited and the cost jumps straight up to $49 when you have more than 5 projects (which is the plan I have), it honestly does a pretty good job. In addition, Codeship also provides automated testing and git push deployment services, but does not provide a server, so you still need to prepare and configure the website server and database yourself.
For other languages, maybe Laravel Forge has a better alternative, maybe not. But I still think that, for me and many others, the cost of ditching PHP is simply too high. Even if I could afford it, it wouldn't make much sense.
Finally, quote Eevee again:
There is no doubt that PHP is so popular!