resin4.0.41 配置

记录一下jvm配置,和多web应用的配置



<!--

   - Resin 4.0 configuration file.
  -->
<resin xmlns="http://caucho.com/ns/resin"
       xmlns:resin="urn:java:com.caucho.resin">

  <!-- property-based Resin configuration -->
  <resin:properties path="${__DIR__}/resin.properties" optional="true"/>

  <resin:if test="${properties_import_url}">
     <resin:properties path="${properties_import_url}"
                    optional="true" recover="true"/>
  </resin:if>


  <!-- Logging configuration for the JDK logging API -->
  <log-handler name="" level="all" path="stdout:"
               timestamp="[%y-%m-%d %H:%M:%S.%s]"
               format=" {${thread}} ${log.message}"/>
               
  <!--
     - Alternative pseudo-TTCC log format
     -
     - <log-handler name="" level="all" path="stdout:"
     -           timestamp="%y-%m-%d %H:%M:%S.%s"
     -           format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
    -->
   
  <!--
     - level='info' for production
     - 'fine' or 'finer' for development and troubleshooting
    -->
  <logger name="" level="${log_level?:'info'}"/>

  <logger name="com.caucho.java" level="config"/>
  <logger name="com.caucho.loader" level="config"/>

  <!--
     - Default configuration applied to all clusters, including
     - HTTP, HTTPS, and /resin-admin configuration.
    -->
  <resin:import path="${__DIR__}/cluster-default.xml"/>
 
  <!--
     - health configuration
    -->
  <resin:import path="${__DIR__}/health.xml"/>

 
  <!--
     - Remote management requires at least one enabled admin user.
    -->
  <resin:AdminAuthenticator>
    <user name="${admin_user}" password="${admin_password}"/>
    
    <resin:import path="${__DIR__}/admin-users.xml" optional="true"/>
  </resin:AdminAuthenticator>

  <!--
     - For clustered systems, create a password in as cluster_system_key
    -->
  <cluster-system-key>${cluster_system_key}</cluster-system-key>

  <!--
     - For production sites, change dependency-check-interval to something
     - like 600s, so it only checks for updates every 10 minutes.
    -->
  <!-- <dependency-check-interval>${dependency_check_interval?:'2s'}</dependency-check-interval> -->

  <dependency-check-interval>-1s</dependency-check-interval>

  <!-- For resin.properties dynamic cluster joining -->
  <home-cluster>${home_cluster}</home-cluster>
  <home-server>${home_server}</home-server>
  <elastic-server>${elastic_server}</elastic-server>
  <elastic-dns>${elastic_dns}</elastic-dns>

  <!--
     - Configures the main application cluster.  Load-balancing configurations
     - will also have a web cluster.
    -->
  <cluster id="app">



<server-default>
    <jvm-arg>-Xms2048m</jvm-arg>
    <jvm-arg>-Xmx2048m</jvm-arg>
    <jvm-arg>-Xmn512m</jvm-arg>
    <jvm-arg>-XX:PermSize=156m</jvm-arg>
    <jvm-arg>-XX:MaxPermSize=512m</jvm-arg>
    <thread-max>1024</thread-max>
    <socket-timeout>30s</socket-timeout>
    <keepalive-max>512</keepalive-max>
    <keepalive-timeout>60s</keepalive-timeout>
</server-default>



    <!-- define the servers in the cluster -->
    <server-multi id-prefix="app-" address-list="${app_servers}" port="6800"/>

    <host-default>
      <!-- creates the webapps directory for .war expansion -->
      <web-app-deploy path="webapps"
                      expand-preserve-fileset="WEB-INF/work/**"
                      multiversion-routing="${webapp_multiversion_routing}"
                      path-suffix="${elastic_webapp?resin.id:''}"/>
    </host-default>

    <!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
    <host-deploy path="hosts">
      <host-default>
        <resin:import path="host.xml" optional="true"/>
      </host-default>
    </host-deploy>





<host id="a.com"  root-directory=".">
      <web-app id="/" root-directory="webapps/client_ht"/>
    </host>

<host id="b.com" root-directory=".">
      <web-app id="/" root-directory="webapps/client_ql"/>
    </host>


<host id="c.com"  root-directory=".">
      <web-app id="/" root-directory="webapps/client_pm"/>
    </host>


      
    <resin:if test="${resin_doc}">
      <host id="${resin_doc_host}" root-directory="${resin_doc_host}">
        <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
      </host>
    </resin:if>
  </cluster>

  <cluster id="web">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="web-" address-list="${web_servers}" port="6810"/>

    <host id="" root-directory="web">
      <web-app id="">
        <resin:LoadBalance regexp="" cluster="app"/>
      </web-app>
      
      <web-app id="/async">
        <resin:LoadBalance regexp="" cluster="app"/>
      </web-app>
    </host>
  </cluster>

  <cluster id="memcached" xmlns:memcache="urn:java:com.caucho.memcached">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="memcached-" address-list="${memcached_servers}" port="6820">
      <!-- listen for the memcache protocol -->
      <listen port="${memcached_port?:11211}"
              keepalive-timeout="600s" socket-timeout="600s">
        <memcache:MemcachedProtocol/>
      </listen>
    </server-multi>
  </cluster>
 
  <cluster id="proxycache">
    <!-- define the servers in the cluster -->
    <server-multi id-prefix="proxycache-" address-list="${proxycache_servers}" port="6830"/>

    <host id="" root-directory="proxycache">
      <web-app id="">
        <resin:HttpProxy regexp=".*">
          <!-- backend HTTP servers to proxy to -->
          <addresses>${backend_servers}</addresses>
        </resin:HttpProxy>
      </web-app>
    </host>
  </cluster>

</resin>
泛微Resin是一款用于构建和管理应用程序的服务器软件。4.0.58表示该软件的版本号,其中的“4.0”表示主版本号,而“58”表示次版本号。 Resin服务器的身份是“app-0”。这意味着它是集群中的第一个应用服务器节点。在一个集群中,可能会有多个应用服务器节点,每个节点都有一个唯一的标识符,以便于管理和追踪。当用户请求访问应用程序时,服务器集群会自动将请求分配给可用的服务器节点来处理。 Resin服务器具有高性能和可扩展性,能够处理大量并发请求并提供稳定的服务。它支持各种编程语言和框架,使开发人员能够构建各种类型的应用程序,包括Web应用程序、企业级应用程序等。 泛微Resin提供了许多功能和工具,用于监控和管理服务器的性能和运行状态。管理员可以通过控制台界面来查看服务器的运行日志、配置参数和性能指标。他们可以监控服务器的负载、连接数和响应时间等关键指标,以确保服务器始终处于最佳状态。 除了基本的服务器功能,Resin还提供了一些高级功能,如负载均衡、故障转移和缓存等。这些功能可以提高应用程序的可用性和性能,确保用户获得快速和可靠的访问体验。 总之,泛微Resin是一款功能强大的服务器软件,适用于构建和管理各种类型的应用程序。通过其稳定性、可扩展性和丰富的功能,它能够满足企业和开发者的需求,并提供优质的用户体验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值