Home Backend Development PHP Tutorial Abandoning PHP is too expensive_php digest

Abandoning PHP is too expensive_php digest

May 16, 2016 pm 07:53 PM
mysql server

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 look at their pricing model, you should be able to understand (the picture is quoted from my homepage, sorry there is some Swedish in it~), 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 quite 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 price of abandoning PHP is 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!
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP's big data structure processing skills PHP's big data structure processing skills May 08, 2024 am 10:24 AM

Big data structure processing skills: Chunking: Break down the data set and process it in chunks to reduce memory consumption. Generator: Generate data items one by one without loading the entire data set, suitable for unlimited data sets. Streaming: Read files or query results line by line, suitable for large files or remote data. External storage: For very large data sets, store the data in a database or NoSQL.

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

Backing up and restoring a MySQL database in PHP can be achieved by following these steps: Back up the database: Use the mysqldump command to dump the database into a SQL file. Restore database: Use the mysql command to restore the database from SQL files.

How to optimize MySQL query performance in PHP? How to optimize MySQL query performance in PHP? Jun 03, 2024 pm 08:11 PM

MySQL query performance can be optimized by building indexes that reduce lookup time from linear complexity to logarithmic complexity. Use PreparedStatements to prevent SQL injection and improve query performance. Limit query results and reduce the amount of data processed by the server. Optimize join queries, including using appropriate join types, creating indexes, and considering using subqueries. Analyze queries to identify bottlenecks; use caching to reduce database load; optimize PHP code to minimize overhead.

How to insert data into a MySQL table using PHP? How to insert data into a MySQL table using PHP? Jun 02, 2024 pm 02:26 PM

How to insert data into MySQL table? Connect to the database: Use mysqli to establish a connection to the database. Prepare the SQL query: Write an INSERT statement to specify the columns and values ​​to be inserted. Execute query: Use the query() method to execute the insertion query. If successful, a confirmation message will be output.

How to create a MySQL table using PHP? How to create a MySQL table using PHP? Jun 04, 2024 pm 01:57 PM

Creating a MySQL table using PHP requires the following steps: Connect to the database. Create the database if it does not exist. Select a database. Create table. Execute the query. Close the connection.

How to use MySQL stored procedures in PHP? How to use MySQL stored procedures in PHP? Jun 02, 2024 pm 02:13 PM

To use MySQL stored procedures in PHP: Use PDO or the MySQLi extension to connect to a MySQL database. Prepare the statement to call the stored procedure. Execute the stored procedure. Process the result set (if the stored procedure returns results). Close the database connection.

How to fix mysql_native_password not loaded errors on MySQL 8.4 How to fix mysql_native_password not loaded errors on MySQL 8.4 Dec 09, 2024 am 11:42 AM

One of the major changes introduced in MySQL 8.4 (the latest LTS release as of 2024) is that the "MySQL Native Password" plugin is no longer enabled by default. Further, MySQL 9.0 removes this plugin completely. This change affects PHP and other app

The difference between oracle database and mysql The difference between oracle database and mysql May 10, 2024 am 01:54 AM

Oracle database and MySQL are both databases based on the relational model, but Oracle is superior in terms of compatibility, scalability, data types and security; while MySQL focuses on speed and flexibility and is more suitable for small to medium-sized data sets. . ① Oracle provides a wide range of data types, ② provides advanced security features, ③ is suitable for enterprise-level applications; ① MySQL supports NoSQL data types, ② has fewer security measures, and ③ is suitable for small to medium-sized applications.

See all articles