FastCGI

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(New page: When you have a backend server like Ruby or PHP which has a FastCGI connection, you can use the <resin:FastCgi> dispatch tag to dispatch to that backend. Since Resin's FastCgi uses load b...)
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When you have a backend server like Ruby or PHP which has a FastCGI connection, you can use the <resin:FastCgi> dispatch tag to dispatch to that backend.
+
{{Cleanup}}
 +
[[Category: Cookbook]] [[Category: Proxy]]
  
Since Resin's FastCgi uses load balancing automatically, you can balance the load across multiple servers.
+
When you have a backend server like Ruby or PHP which has a FastCGI connection, you can use the <resin:FastCgiProxy> dispatch tag to dispatch to that backend.
  
== FastCgi dispatch in resin.xml ==
+
Since Resin's FastCgiProxy uses load balancing automatically, you can balance the load across multiple servers.
  
The FastCgi is part of Resin's rewrite-dispatch capability.
+
* serves HTTP from port 80
 +
* changes user to "resin" from root
 +
* enables proxy caching
 +
* FastCgiProxy load balances to 192.168.1.10:7000 and 192.168.1.10:7000
 +
 
 +
== FastCgiProxy dispatch in resin.xml ==
 +
 
 +
The FastCgiProxy is part of Resin's rewrite-dispatch capability.
 
   
 
   
 
   <resin xmlns="http://caucho.com/ns/resin">
 
   <resin xmlns="http://caucho.com/ns/resin">
 +
 +
    <log-handler name="" level="all" path="stdout:"
 +
                timestamp="[%y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
 
   
 
   
 
     <cluster id="">
 
     <cluster id="">
Line 23: Line 34:
 
         <web-app id="">
 
         <web-app id="">
 
   
 
   
           <resin:FastCgi regexp="^">
+
           <resin:FastCgiProxy>
 
             <address>192.168.1.10:7000</address>
 
             <address>192.168.1.10:7000</address>
 
             <address>192.168.1.11:7000</address>
 
             <address>192.168.1.11:7000</address>
           </resin:FastCgi>  
+
           </resin:FastCgiProxy>  
 
   
 
   
 
         </web-app>
 
         </web-app>

Latest revision as of 15:50, 2 December 2011

40px-Edit-clear.png This article requires cleanup and may refer to a legacy version of Resin.

Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation.

When you have a backend server like Ruby or PHP which has a FastCGI connection, you can use the <resin:FastCgiProxy> dispatch tag to dispatch to that backend.

Since Resin's FastCgiProxy uses load balancing automatically, you can balance the load across multiple servers.

  • serves HTTP from port 80
  • changes user to "resin" from root
  • enables proxy caching
  • FastCgiProxy load balances to 192.168.1.10:7000 and 192.168.1.10:7000

FastCgiProxy dispatch in resin.xml

The FastCgiProxy is part of Resin's rewrite-dispatch capability.

 <resin xmlns="http://caucho.com/ns/resin">

   <log-handler name="" level="all" path="stdout:"
                timestamp="[%y-%m-%d %H:%M:%S.%s] {%{thread}} "/>

   <cluster id="">
     <resin:import path="${__DIR__}/app-default.xml"/>

     <server id="">
       <http port="80"/>
       <user-name>resin</user-name>
       <group-name>resin</group-name>
     </server>

     <proxy-cache/>

     <host id="">
       <web-app id="">

         <resin:FastCgiProxy>
           <address>192.168.1.10:7000</address>
           <address>192.168.1.11:7000</address>
         </resin:FastCgiProxy> 

       </web-app>
     </host>
   </cluster>

 </resin>
Personal tools