大型项目优化思路
大型项目优化概述--PHP解析流程
优化方案
考虑PHP解析的的每一个过程
1、客户端请求到web服务器的过程中可能由于不同的网络导致传输缓慢可以使用多线路的部署方式
2、当web服务器接受请求执行的效率以及并发的问题。可以选择使用负载均衡并且对项目中的代码进行优化
3、对于mysql执行效率跟并发同样会影响性能,可以使用各种mysql优化提升执行速度并且可以使用mysql读写分离缓解压力
优化可用技术
1、网站开发中尽量使用较小的资源文件
2、使用压缩技术(gzip)
3、使用cdn加速资源文件
4、使用缓存技术(内存缓存redis/memcache/页面静态化)
5、对数据库进行优化
6、网站架构重构采用分层模式设计
7、使用负载均衡技术
8、数据库使用读写分离或者分布式技术
9、对相关软件配置进行优化
10、升级硬件(磁盘使用固态,使用raid卡)
本作品采用《CC 协议》,转载必须注明作者和本文链接
本帖由系统于 6年前 自动加精
做无状态服务。
使用更高效的语言 比如go 哈哈哈
不考虑下serverless吗?
@韩众 没接触go语言。。。只接触过php,py,js和一点点的java。。。
@樊浩柏 If you look at the big three cloud providers, Amazon, Google and Microsoft, they each provide their own FaaS solution. Lambda, Cloud Functions and Azure Functions respectively. If you take a look at the documentation, none provide support for PHP*.
@hareluya If you look at the big three cloud providers, Amazon, Google and Microsoft, they each provide their own FaaS solution. Lambda, Cloud Functions and Azure Functions respectively. If you take a look at the documentation, none provide support for PHP*.
说的都是很基础的东西