Presentation is loading. Please wait.

Presentation is loading. Please wait.

Speeding Up Alfresco and Share using Nginx Reverse/Caching Frontend Proxy Ishara Fernando Senior Linux Systems Administrator.

Similar presentations


Presentation on theme: "Speeding Up Alfresco and Share using Nginx Reverse/Caching Frontend Proxy Ishara Fernando Senior Linux Systems Administrator."— Presentation transcript:

1 Speeding Up Alfresco and Share using Nginx Reverse/Caching Frontend Proxy Ishara Fernando Senior Linux Systems Administrator

2 Key Considerations For a content Management application based on web, we should consider the following such as Proxy request so that application ports shouldn’t be exposed to the outside world Caching Content for High performance Webpage loading speed Load balancing for High performance

3 Key Considerations For a content Management application based on web, we should consider the following such as Proxy request so that application ports shouldn’t be exposed to the outside world Caching Content for High performance Webpage loading speed Load balancing for High performance

4 Key Considerations For a content Management application based on web, we should consider the following such as Proxy request so that application ports shouldn’t be exposed to the outside world Caching Content for High performance Webpage loading speed Load balancing for High performance

5 Choose the Web Proxy Server Considering the requirement and the key list of performance criteria, we have the following options for the web proxy Apache Nginx Oracle Weblogic Windows IIS Lighthttpd IBM HTTP Server

6 Why Nginx, not Apache ? NginxApache Event DrivenProcess Driven Does not Create a New process for each request Creates a New process for each request Best for serving Static Page content (Such as Alfresco) Best for serving Dynamic Pages Performance doesn’t rely on the underlying hardware Performance rely on the underlying hardware

7 Why Nginx, not Apache ? NginxApache Event DrivenProcess Driven Does not Create a New process for each request Creates a New process for each request Best for serving Static Page content (Such as Alfresco) Best for serving Dynamic Pages Performance doesn’t rely on the underlying hardware Performance rely on the underlying hardware

8 Reverse Proxy for Alfresco When do we use Nginx as a Reverse Proxy ?

9 Reverse Proxy for Alfresco ## Example Reverse proxy configuration for /alfresco and /share location / { rewrite ^/$ /share; } location /share { proxy_pass http://someurl.com/share; proxy_cache alfresco-cache; } location /alfresco { proxy_pass http://someurl.com/alfresco; proxy_cache alfresco-cache; }

10 Reverse Proxy for Alfresco ## Example Reverse proxy configuration for /alfresco and /share location / { rewrite ^/$ /share; } location /share { proxy_pass http://someurl.com/share; proxy_cache alfresco-cache; } location /alfresco { proxy_pass http://someurl.com/alfresco; proxy_cache alfresco-cache; }

11 Caching Content of Alfresco Why cache content of Alfresco ?

12 Caching Content Configurations ##An Example HTTP Block configuration for caching content on Local Disk http { include /etc/nginx/mime.types; default_type application/octet-stream; ….. ….. proxy_buffering on; proxy_cache_path /var/cache/nginx keys_zone=alfresco-cache:1512m inactive=1d; include /etc/nginx/conf.d/*.conf; }

13 Caching Content Configurations ##An Example HTTP Block configuration for caching content on Local Disk location /share { proxy_pass http://someurl.com/share; proxy_cache alfresco-cache; } location /alfresco { proxy_pass http://someurl.com/alfresco; proxy_cache alfresco-cache; }

14 Speeding up Webpage loading of Alfresco Nginx pagespeed module can be used to increase the performance of loading of Alfresco. Below are the results of web performance tests before and after configuring Nginx pagespeed module Before Configuring Nginx Pagespeed Module After Configuring Nginx Pagespeed Module

15 Speeding up Webpage loading of Alfresco Nginx pagespeed module can be used to increase the performance of loading of Alfresco. Below are the results of web performance tests before and after configuring Nginx pagespeed module Before Configuring Nginx Pagespeed Module After Configuring Nginx Pagespeed Module

16 Nginx Pagespeed Module for speeding up webpage loading ## Below is an example block of configurations which utilizes the Nginx pagespeed module http { pagespeed on; pagespeed FileCachePath /var/ngx_pagespeed_cache; pagespeed EnableFilters combine_css,combine_javascript,rewrite_javascript; }

17 Load balancing across an Alfresco Cluster Nginx has the inbuilt capability of Load balancing incoming requests across an Alfresco Cluster using nginx upstream module.

18 Load balancing Configurations ## Below is a configuration block of load balancing requests between a 2 Node Alfresco Cluster using IP_HASH loadbalancing algorithm upstream example.com { ip_hash; server A.B.C.D:8080 max_fails=2 fail_timeout=10s weight=1; server A.B.C.E:8080 max_fails=2 fail_timeout=10s weight=1; }example.com

19 Load balancing Configurations ## Below is a configuration block of load balancing requests between a 2 Node Alfresco Cluster using IP_HASH loadbalancing algorithm upstream example.com { ip_hash; server A.B.C.D:8080 max_fails=2 fail_timeout=10s weight=1; server A.B.C.E:8080 max_fails=2 fail_timeout=10s weight=1; }example.com

20 Load balancing Configurations ## Below is a configuration block of load balancing requests between a 2 Node Alfresco Cluster using IP_HASH loadbalancing algorithm upstream example.com { ip_hash; server A.B.C.D:8080 max_fails=2 fail_timeout=10s weight=1; server A.B.C.E:8080 max_fails=2 fail_timeout=10s weight=1; }example.com

21 Nginx Failover Configurations ## Below specifies nginx that alfresco node1 is down upstream example.com { ip_hash; server A.B.C.D:8080 max_fails=2 fail_timeout=10s weight=1 down ; server A.B.C.E:8080 max_fails=2 fail_timeout=10s weight=1; }example.com

22 End Of Presentation Thank you !!!! Email : ifernando@zaizi.com


Download ppt "Speeding Up Alfresco and Share using Nginx Reverse/Caching Frontend Proxy Ishara Fernando Senior Linux Systems Administrator."

Similar presentations


Ads by Google