WURFL InFuze 를 사용한 NGINX Plus 용 로드 밸런싱

WURFL InFuze 는 애플리케이션 전송 관리를 확장하여 여러 디바이스 유형에 대한 반응형 웹 디자인을 동적으로 지원하는 좋은 예입니다. 아래는 ScientiaMobile 의 Ken Jones가 새로운 WURFL NGINX Plus 인증 모듈에 대해 작성한 게스트 블로그 포스트입니다.

NGINX는 유연한 소프트웨어 기반의 고가용성 로드 밸런싱과 애플리케이션 전송 플랫폼을 제공합니다. 이제 NGINX Plus용 WURFL InFuze 인증 모듈을 사용하면 WURFL의 디바이스 인텔리전스를 NGINX Plus의 애플리케이션 전송 로직에 빠르게 주입할 수 있습니다.

목차

1. WURFL Infuze란?
2. 스마트폰, 태블릿 또는 기타 디바이스 폼 팩터에 기반한 NGINX 로드 밸런싱

1. WURFL InFuze 란?

WURFL InFuze 는 웹사이트나 애플리케이션에서 모바일 디바이스를 감지하고 이해하는 혁신적인 기술입니다. 이 기술은 사용자가 어떤 디바이스를 사용하더라도 최적화된 경험을 제공하고자 개발되었습니다.

일반적으로, 다양한 모바일 디바이스가 다양한 크기, 해상도, 브라우저 및 운영 체제를 가지고 있기 때문에 이를 식별하고 이해하는 것은 중요합니다. WURFL InFuze 는 디바이스의 속성과 기능을 식별하여, 이를 기반으로 최적의 콘텐츠를 제공하거나 사용자 경험을 개선하는 데 사용됩니다.

이 기술은 기업들이 디바이스별로 최적화된 경험을 구현하는 데 도움을 줍니다. 예를 들어, 스마트폰, 태블릿, 노트북 등 다양한 디바이스에서 홈페이지나 앱이 일관되게 잘 작동하도록 지원합니다. 이를 통해 사용자들은 어떤 디바이스를 사용하더라도 편리하게 서비스를 이용할 수 있습니다.

또한, WURFL InFuze 는 디바이스의 속성을 실시간으로 업데이트하고 관리하여 새로운 디바이스 출시에 대응할 수 있도록 도와줍니다. 이러한 기능은 빠르게 변화하는 기술 트렌드와 다양한 새로운 디바이스 출시에 대응하는 데 큰 장점을 제공합니다.

WURFL InFuze는 다양한 업종에서 사용되고 있으며, 이를 통해 기업들은 사용자들에게 일관된 및 최적화된 디바이스 경험을 제공할 수 있습니다. 이를 통해 사용자들의 만족도를 높이고 비즈니스 성과를 향상시킬 수 있습니다.

2. 스마트폰, 태블릿 또는 기타 디바이스 폼 팩터에 기반한 NGINX 로드 밸런싱

WURFL Infuzu 은 NGINX 오픈 소스 또는 NGINX Plus 내에서 로드 밸런싱 기준에 대한 다양한 옵션을 제공합니다. 운영체제, 브라우저 유형 또는 스마트폰 가격별로 로드 밸런싱을 구현할 수 있습니다. 다음 예제(NGINX Open Source 와 NGINX Plus 모두에서 작동)에서는 디바이스의 폼 팩터에 따라 로드 밸런싱 합니다.

NGINX Plus 와 WURFL InFuze

이 시나리오 테스트를 시작하려면 일반적으로 /etc/nginx/nginx.conf에 있는 기본 NGINX 구성 파일을 편집해야 합니다.

트래픽을 스마트폰, 태블릿, 기타 디바이스(데스크톱, 스마트 TV 등)의 세 가지 스트림으로 분리합니다. NGINX Plus는 이러한 스트림을 특정 서버로 리다이렉션할 수 있습니다.

# This is an example of how to configure NGINX to be used with WURFL Device Detection module.
#
# This configuration performs a redirection to different backends based on WURFL detection
# In this scenario we have three backend pools:
#
#  - One for SMARTPHONE devices: SmartphonePool (192.168.140.2x)
#  - One for TABLET devices: TabletPool (192.168.140.3x)
#  - One for any other type of client (desktop, smartTV, etc.): GeneralPurposePool (192.168.140.1x)
#
# Uncomment this line if you are using NGINX Plus or you compiled WURFL module with 
# 'configure --add-dynamic-module' (WURFL API version 1.8.1.0 or above / NGINX OSS 1.9.11 or above).
#load_module modules/ngx_http_wurfl_module.so;

worker_processes 1;

error_log logs/error.log info;
pid logs/nginx.pid;

events {
    worker_connections  512;
}

http {

    # the backends pool for requests from smartphones
    upstream SmartphonePool {
        server 192.168.140.20;
        server 192.168.140.21;
        server 192.168.140.22;
    }

    # the backends pool for requests from tablets
    upstream TabletPool {
        server 192.168.140.30;
        server 192.168.140.31;
        server 192.168.140.32;
    }

    # the backends pool for requests from other client types
    upstream GeneralPurposePool {
        server 192.168.140.10;
        server 192.168.140.11;
        server 192.168.140.12;
    }

    # WURFL root definition, one per config. User MUST specify this path for WURFL engine 
    # to start correctly.
    wurfl_root      /usr/share/wurfl/wurfl.zip;

    # Increase the variable hash size
    variables_hash_max_size 1024;
    variables_hash_bucket_size 1024;

    wurfl_cache_double_lru 10000,3000;

    # the WURFL virtual capability that determines if a device is a mobile phone
    wurfl_request_capability is_smartphone;
    wurfl_request_capability is_tablet;

    # Map to different upstream backends based on concatenation of is_smartphone and is_tablet 
    # (pipe separated). $backend_pool_name contains the upstream name based on is_phone value.

    map $wurfl_cap_is_smartphone|$wurfl_cap_is_tablet $backend_pool_name {
        true|false   "SmartphonePool";
        false|true   "TabletPool";
    # any other combination will redirect to GeneralPurposePool
        default      "GeneralPurposePool";
    }

    server {
        listen       80;
        server_name  localhost;

        location / {
            # hredirect request to the target upstream
            proxy_pass http://$backend_pool_name;
        }
    }
}

IP 주소와 upstream 블록 이름은 예시일 뿐입니다. 테스트 환경에 맞게 변경하세요.

WURFL InFuze NGINX Plus 인증 모듈의 30일 무료 체험판을 시작하려면 SicentiaMobile 을 방문하세요.

지금 바로 NGINX Plus 30일 무료 체험판을 시작하거나 NGINX STORE에 문의하여 사용 사례에 대해 논의하세요.

NGINX에 대한 최신 정보들을 빠르게 전달받고 싶으시다면, 아래의 뉴스레터를 구독하세요.