</a><div class="a-content"><a class="clearlink" href="15583468928554.html">
                  
                  </a><div class="a-content-text"><a class="clearlink" href="15583468928554.html">
                    
                    	<p>kong作为非java全家桶的一员,在非java领域的网关系统中得到了广泛的应用</p>

使用docker一键启动kong

参考项目:https://github.com/Kong/docker-kong/tree/master/compose

启动过程如下:

git clone https://github.com/Kong/docker-kong.git
cd docker-kong/compose
docker-compose up -d

查看操作效果:

可以看到kong监控了4个端口

                  </div>
              </div>
            
            <div class="read-more clearfix">
              <div class="more-left left">
               <a href="15583468928554.html">Read more</a>   
                <span class="date">2019/5/20</span>
                <span>posted in </span> 
      				  
      					    <span class="posted-in"><a href="lua.html">LUA</a></span>
      				  
      					    <span class="posted-in"><a href="openresty.html">OpenResty</a></span>
      				   
              </div>
              <div class="more-right right">
              <span class="comments">
                  

                   
              </span>
              </div>
            </div>
          </div>
    
		<div class="article">
            <a class="clearlink" href="15582846518332.html">
            
              <h1>lua开发注意事项</h1>
              <div class="a-content">
                  
                  <div class="a-content-text">
                    
                    	<p>lua中目前只有false和nil是假,空table,空字符串,0是真<br/>

image-20180604144329529

false转为数字为nil
image-20180604144254531

字符串连接符:..
image-20180604144422758

                  </div>
              </div>
            </a>
            <div class="read-more clearfix">
              <div class="more-left left">
              
                <span class="date">2018/5/20</span>
                <span>posted in </span> 
      				  
      					    <span class="posted-in"><a href="lua.html">LUA</a></span>
      				   
              </div>
              <div class="more-right right">
              <span class="comments">
                  

                   
              </span>
              </div>
            </div>
          </div>
    
		<div class="article">
            <a class="clearlink" href="15582844238379.html">
            
              <h1>灰度发布</h1>
              <div class="a-content">
                  
                  <div class="a-content-text">
                    
                    	<pre><code class="language-sql">CREATE TABLE `gray` (

id int(10) unsigned NOT NULL AUTO_INCREMENT,
project varchar(45) NOT NULL,
shopId text,
status tinyint(1) unsigned NOT NULL DEFAULT '1',
created_at timestamp NULL DEFAULT NULL,
updated_at timestamp NULL DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

INSERT INTO `cpx_prod`.`gray` (`id`, `project`, `shopId`, `status`, `created_at`, `updated_at`) VALUES ('2', 'kufang', '1804', '1', '2018-05-28 17:04:25', '2018-05-28 17:04:25');

灰度开发方案

  1. 设计灰度表结构和存储位置
  2. 设计redis键,选择灰度发布使用的redis服务器
  3. 在ops平台上开发店铺灰度灰度状态管理页面
  4. 使用ops现有的指定发布功能发布灰度代码
  5. nginx lua根据店铺的灰度状态走不同的项目路径

灰度缓存更新

  1. ops灰度系统设置了店铺灰度后更新灰度缓存
  2. lua检测到redis里没有缓存key,从mysql中读取店铺灰度数据,缓存到redis中,redis使用一个key保存所有灰度店铺的id,使用json序列化

灰度代码发布

  1. 灰度代码发布复用ops上的指定发布
                  </div>
              </div>
            </a>
            <div class="read-more clearfix">
              <div class="more-left left">
               <a href="15582844238379.html">Read more</a>   
                <span class="date">2018/5/20</span>
                <span>posted in </span> 
      				  
      					    <span class="posted-in"><a href="ops.html">OPS</a></span>
      				  
      					    <span class="posted-in"><a href="lua.html">LUA</a></span>
      				  
      					    <span class="posted-in"><a href="openresty.html">OpenResty</a></span>
      				   
              </div>
              <div class="more-right right">
              <span class="comments">
                  

                   
              </span>
              </div>
            </div>
          </div>
    
          


		<div class="row">
		  <div class="large-6 columns">
		  <p class="text-left" style="padding-top:25px;">
		   
		  </p>
		  </div>
		  <div class="large-6 columns">
		<p class="text-right" style="padding-top:25px;">
		
		</p>
		  </div>
		</div>