Skip to main content

Posts

Showing posts from July, 2014

Apache Tomcat Load Balance in windows

- apache tomcat Load Balance 1. apache installation httpd-2.2.25-win32-x86-openssl-0.9.8y.msi 2. Module copy tomcat-connectors-1.2.40-windows-i386-httpd-2.2.x/mod_jk.so => /apache/modules/mod_jk.so 3. tomcat copy /apache-tomcat-7 /apache-tomcat-72 4. apache configuration modify /apache/conf/httpd.conf # apache-tomcat connector <IfModule mod_proxy.c> <IfModule mod_proxy_ajp.c> Include "conf/extra/httpd-apj.conf" </IfModule> </IfModule> LoadModule jk_module modules/mod_jk.so JkWorkersFile conf/workers.properties JkLogLevel info JkLogFile logs/mod_jk.log JkMount /*.html lb JkMount /*.jsp lb JkMount /*.ajax lb JkMount /*.xpl lb JkMount /j_spring_security_check lb DocumentRoot "/wtpwebapps/testApp" <Directory "/wtpwebapps/testApp">    Options Indexes FollowSymLinks    AllowOverride None    Order allow,deny    Allow from all </Directory> <Location /jkmanager/> J

Port forwarding with ELB in AWS vs NginX

< requirement > input 1 : http://aaa1.testdomain.com internal service 1 : http://localhost:3000 input 2 : http://aaa2.testdomain.com internal service 2 : http://localhost:3001 < 1. AWS approach > 1. create LoadBalancers cf. https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LoadBalancers: ㅇ create Load Balancer for 1st port 1. Define Load Balancer Load Balancer name: aaa1-test Load Balancer Port: 80 Instance Port: 3000 2. Configure Health Check Ping Path: it's important! 3. Add EC2 Instances: Add EC2 Instances to Load Balancer 4. check out the domain and service (1st Load Balancer's Description > DNS Name > A Record : ex) aaa1-test-1425011489.us-east-1.elb.amazonaws.com ) - test service : http://aaa1-test-1425011489.us-east-1.elb.amazonaws.com ㅇ create Load Balancer for 2nd port 1. Define Load Balancer Load Balancer name: aaa2-test Load Balancer Port: 80 Instance Port: 3001 2. Conf

experience sharing for real-time log indexing in Elasticsearch

Elasticsearch automatically makes type mapping with log data, but in the most of cases, the mapping data is not correct, so we should change them. this is my experience of that. 1) run elasticsearch 2) run logstash with configration elk:/data1/elasticsearch/logstash-1.4.0> vi logstash-teton_runtime.conf& input{     file{         codec => json         path => ["/data1/elasticsearch/temp/*.log"]         start_position => "end"     } } output{     elasticsearch {         cluster => "locketCast"         node_name => "logstash-teton_runtime"         host => "xxx.xxx.xxx.xxx"         index => "teton_runtime"     } } elk:/data1/elasticsearch/logstash-1.4.0> bin/logstash -f mixpanel.conf 3) make log file in /data1/elasticsearch/temp/*.log {"androidId":"91e8b0c3d89","facebookId":"11250","type":0,"numberOfMyFollowers":