作家
登录

使用Nginx搭建高可用,高并发的WCF集群

作者: 来源: 2017-11-13 13:07:08 阅读 我要评论

  •     <services> 
  •       <service name="WcfService.HomeService"
  •         <endpoint address="/HomeService" binding="basicHttpBinding" contract="WcfService.IHomeService"
  •           <identity> 
  •             <dns value=http://server.51cto.com/"localhost" /> 
  •           </identity> 
  •         </endpoint> 
  •         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
  •         <host> 
  •           <baseAddresses> 
  •             <add baseAddress="http://192.168.23.187:8733" /> 
  •           </baseAddresses> 
  •         </host> 
  •       </service> 
  •     </services> 
  •   </system.serviceModel> 
  • </configuration> 
  • 因为windows的两台机械的ip地址是192.168.23.187,192.168.23.188,所以安排的时刻留意一下config中的baseAddress地址。

    2、centos上的nginx搭建

    1. [root@localhost nginx-1.13.6]# ./configure --prefix=/usr/myapp/nginx 
    2. [root@localhost nginx-1.13.6]# make && make install 

    然后在nginx的安装目次下面找到conf文件,修改琅绫擎的nginx.conf 设备。

    1. [root@localhost nginx]# cd conf 
    2. [root@localhost conf]# ls 
    3. fastcgi.conf            koi-utf             nginx.conf           uwsgi_params 
    4. fastcgi.conf.default    koi-win             nginx.conf.default   uwsgi_params.default 
    5. fastcgi_params          mime.types          scgi_params          win-utf 
    6. fastcgi_params.default  mime.types.default  scgi_params.default 
    7. [root@localhost conf]# vim nginx.conf 

    具体设备如下,留意下面“标红”的处所,权重按照1:5的方法进行调用,关于其他的设备,大年夜家可以在网上搜一下就可以了。

    3、 client端的法度榜样搭建

    第一件事就是将 192.168.23.190 映射到本机的host中去,因为办事不供给给第三方应用,所以加host照样很轻松的。

    192.168.23.190 cluster.com


      推荐阅读

      如何避繁就简为数据中心减负

    Tech Neo技巧沙龙 | 11月25号,九州云/ZStack与您一路商量云时代收集界线治理实践 跟着人们对信息数据应用的处>>>详细阅读


    本文标题:使用Nginx搭建高可用,高并发的WCF集群

    地址:http://www.17bianji.com/lsqh/38778.html

    关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)