zoukankan      html  css  js  c++  java
  • open-php开源项目:short-link-jump 高性能短连接跳转服务

    2021年6月25日15:15:07

    项目url

    https://gitee.com/open-php_admin/short-link-jump

    基于webman的高性能短连接跳转服务

    相关组件
    php >= 8.0
    redis
    mysql 8.0

    此项目完全不建议在windows下运行业务,简单开发测试没有问题

    short id设置

    如果你想产出的ID看起来更习惯一点,但是short id的长度相当于来说也更长
    alter table jump_link AUTO_INCREMENT = 10000000;

    sql文件

    sqlshort-link-jump.sql

    一些建议

    本项目建议泡在php8以上,webman但是官方支持7.x,但是实际业务情况下
    开启opcache和JIT性能会更好
    在开发模式下monitor 会可以支持热更新,但是你需要设置 process.php的文件
    monitor_dir
    但是在-d 守护进程模式下,建议roload

    守护模式下启动

    php start.php start -d

    守护模式下更新代码,重启服务

    php start.php reload

    查看状态

    php start.php status

    redis数据丢失问题

    processRecoveryFailedRedisDataCrontab::class
    有执行计划任务在扫描数据库,如果有丢redis数据的链接会重新写入数据到redis

    进程状态

    Workerman[start.php] status
    ----------------------------------------------GLOBAL STATUS----------------------------------------------------
    Workerman version:4.0.19 PHP version:8.0.5
    start time:2021-06-25 12:22:37 run 0 days 2 hours
    load average: 0.09, 0, 0 event-loop:WorkermanEventsSelect
    3 workers 18 processes
    worker_name exit_status exit_count
    webman 0 0
    monitor 0 0
    task 0 0
    ----------------------------------------------PROCESS STATUS---------------------------------------------------
    pid memory listening worker_name connections send_fail timers total_request qps status
    2041480 6M http://0.0.0.0:8787 webman 1 0 1 1756 0 [idle]
    2041481 6M http://0.0.0.0:8787 webman 1 0 1 1639 0 [idle]
    2041482 6M http://0.0.0.0:8787 webman 1 0 1 1621 0 [idle]
    2041483 6M http://0.0.0.0:8787 webman 1 0 1 1699 0 [idle]
    2041484 6M http://0.0.0.0:8787 webman 1 0 1 1872 0 [idle]
    2041485 6M http://0.0.0.0:8787 webman 1 0 1 1675 0 [idle]
    2041486 6M http://0.0.0.0:8787 webman 1 0 1 1707 0 [idle]
    2041487 6M http://0.0.0.0:8787 webman 1 0 1 1839 0 [idle]
    2041488 6M http://0.0.0.0:8787 webman 1 0 1 1795 0 [idle]
    2041489 6M http://0.0.0.0:8787 webman 1 0 1 2053 0 [idle]
    2041491 6M http://0.0.0.0:8787 webman 1 0 1 1804 0 [idle]
    2041492 6M http://0.0.0.0:8787 webman 1 0 1 1850 0 [idle
    2041493 6M http://0.0.0.0:8787 webman 1 0 1 1944 0 [idle]
    2041494 6M http://0.0.0.0:8787 webman 1 0 1 1758 0 [idle]
    2041496 6M http://0.0.0.0:8787 webman 1 0 1 1751 0 [idle]
    2041497 6M http://0.0.0.0:8787 webman 1 0 1 1772 0 [idle]
    2041498 6M none monitor 0 0 1 0 0 [idle]
    2041499 6M none task 0 0 2 0 0 [idle]
    ----------------------------------------------PROCESS STATUS---------------------------------------------------
    Summary 108M -

    压力测试结果

    https://www.cnblogs.com/zx-admin/p/14930657.html

    LICENSE

    MIT

    QQ群 247823727 博客文件如果不能下载请进群下载
    如果公司项目有技术瓶颈问题,如有需要,请联系我,提供技术服务 QQ: 903464207
  • 相关阅读:
    <dependency>
    json、javaBean、xml互转的几种工具介绍
    日志系统logBack的配置以及sdoutAppender控制台输出
    Java中Main函数探讨
    java的Daemon守护线程
    FastJson序列化对象
    多线程情况下获取数据出现的不一致
    苏州地区--校招IT公司
    Spark聚合操作:combineByKey()
    Hadoop初步简介
  • 原文地址:https://www.cnblogs.com/zx-admin/p/14931067.html
Copyright © 2011-2022 走看看