Ignite Apache 와 다른 솔루션 비교
https://www.gridgain.com/resources/product-comparisons/redis-comparison
Ignite 의 성능 비교
pure cache on
cache on with
Ignite vs MariaDB
Ignite Apache 설치
2.3.0 버전을 기준으로 하며 바이너리를 사용했습니다. 컴파일은 삽질을 요하므로 다음에 시간이 있으면 정리해 볼 예정입니다.
링크 : https://ignite.apache.org/
다운로드 : https://ignite.apache.org/download.cgi#binaries
https://apacheignite.readme.io/docs/getting-started#start-from-command-line
관련 정리된 문서(지속적인 업데이트)
https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Home
환경
리눅스에서 설치(CentOS 6.5)
Prerequisites
Apache Ignite was officially tested on:
Name Value
JDK
Oracle JDK 8 and above
Open JDK 8 and above
IBM JDK 8 and above
OS
Linux (any flavor),
Mac OSX (10.6 and up)
Windows (XP and up),
Windows Server (2008 and up)
Oracle Solaris
ISA
x86, x64, SPARC, PowerPC
Network
No restrictions (10G recommended)
바이너리를 다운로드 하고
압축을 풀고
IGNITE_HOME=/home/cute772/platform/apache-ignite-2.7.0-bin
JAVA_HOME=/usr
CLASSPATH=$CLASSPATH:$IGNITE_HOME/libs/ignite-core-2.7.0.jar
CLASSPATH 에 아래 내용 추가
상기 환경변수 추가하고
/home/cute772/platform/apache-ignite-2.7.0-bin 로 이동해서
./bin/iginte.sh 실행 (default config 파일은 config/default-config.xml 임)
config.xml 파일을 별도로 지정하고 싶으면 아래와 같이 실행
./bin/ignite.sh config/config1.xml
./bin/ignite.sh config/config2.xml
./bin/ignite.sh config/config3.xml
sql client 실행
./bin/sqlline.sh --color=true --verbose=true -u jdbc:ignite:thin://127.0.0.1
issuing: !connect jdbc:ignite:thin://127.0.0.1 '' '' org.apache.ignite.IgniteJdbcThinDriver
Connecting to jdbc:ignite:thin://127.0.0.1
Connected to: Apache Ignite (version 2.7.0#20181201-sha1:256ae401)
Driver: Apache Ignite Thin JDBC Driver (version 2.7.0#20181201-sha1:256ae401)
Autocommit status: true
Transaction isolation: TRANSACTION_REPEATABLE_READ
sqlline version 1.3.0
table 생성
CREATE TABLE City ( id LONG PRIMARY KEY, name VARCHAR) WITH "template=replicated";
CREATE TABLE Person ( id LONG, name VARCHAR, city_id LONG, PRIMARY KEY (id, city_id)) WITH "backups=1, affinityKey=city_id";
CREATE INDEX idx_city_name ON City (name);
CREATE INDEX idx_person_name ON Person (name);
INSERT INTO City (id, name) VALUES (1, 'Forest Hill');
INSERT INTO City (id, name) VALUES (2, 'Denver');
INSERT INTO City (id, name) VALUES (3, 'St. Petersburg');
INSERT INTO Person (id, name, city_id) VALUES (1, 'John Doe', 3);
INSERT INTO Person (id, name, city_id) VALUES (2, 'Jane Roe', 2);
INSERT INTO Person (id, name, city_id) VALUES (3, 'Mary Major', 1);
INSERT INTO Person (id, name, city_id) VALUES (4, 'Richard Miles', 2);
SELECT p.name, c.name FROM Person p, City c WHERE p.city_id = c.id;
table 생성 확인
0: jdbc:ignite:thin://127.0.0.1> !tables
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+---------+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE | |
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+---------+
| | PUBLIC | PERSON | TABLE | |
| | PUBLIC | CITY | TABLE | |
+--------------------------------+--------------------------------+--------------------------------+--------------------------------+---------+
0: jdbc:ignite:thin://127.0.0.1> SELECT p.name, c.name FROM Person p, City c WHERE p.city_id = c.id;
+--------------------------------+--------------------------------+
| NAME | NAME |
+--------------------------------+--------------------------------+
| Mary Major | Forest Hill |
| Jane Roe | Denver |
| John Doe | St. Petersburg |
| Richard Miles | Denver |
+--------------------------------+--------------------------------+
4 rows selected (0.062 seconds)
sql command 종료
0: jdbc:ignite:thin://127.0.0.1> !exit
참고
http://cyberx.tistory.com/170
command line tool 참고
https://apacheignite-sql.readme.io/docs/sqlline
http://sqlline.sourceforge.net/#commands
hazelcast vs ignite 벤치마크 결과(ignite 승)
https://stackoverflow.com/questions/31932836/hazelcast-vs-ignite-benchmark
다음엔 클러스터 구성 방법에 대해 정리하겠습니다~~
도움이 되시길~
Apache Ignite Cluster 구성
TCP/IP Discovery : 100 nodes 에 최적화(언더의 의미 100 노드 이상이 되면 ZooKeeper 를 이용하라.. 이런듯)
ZooKeeper Discovery : 100s and 1000s nodes 선형확장?? ^^;; 그냥 100 노드 이상이면 ZooKeeper 쓰는게 맞다는 의미인듯
준비된 시스템이 한대인지라 TCP/IP Discovery Port 기반으로 클러스터링을 구성해야 했음
48000 ~ 480002 3개의 인스턴스를 이용해서 구성함.
config xml 파일 3개를 만들고 아래와 같이 실행
./bin/ignite.sh config/default-config-48000.xml
./bin/ignite.sh config/default-config-48001.xml
./bin/ignite.sh config/default-config-48002.xml
구성이 다 되었으면 클러스터 활성화
apache-ignite-2.7.0-bin> ./bin/control.sh --activate
노드 구성 확인
./bin/control.sh --baseline
Control utility [ver. 2.7.0#20181201-sha1:256ae401]
2018 Copyright(C) Apache Software Foundation
User: **
--------------------------------------------------------------------------------
Cluster state: active
Current topology version: 5
Baseline nodes:
ConsistentID=c6d1fd85-ebe8-4c44-9a89-ffde29639f03, STATE=ONLINE
ConsistentID=d2f41b7f-e6d4-4b04-af57-165b51aaed7a, STATE=ONLINE
ConsistentID=ea3952b9-2c6f-49f4-924e-1d3a094a232a, STATE=ONLINE
--------------------------------------------------------------------------------
Number of baseline nodes: 3
Other nodes not found.
각기 다른 인스턴스에 접속해서 데이터 동기화 확인
0: jdbc:ignite:thin://127.0.0.1:10802> INSERT INTO Person (id, name, city_id) VALUES (7, 'wDwarf heheh 10802', 1);
1 row affected (0.16 seconds)
인스턴스별 접속 방법(데이터 싱크 확인에 필요)
./bin/sqlline.sh --color=true --verbose=true -u jdbc:ignite:thin://127.0.0.1:10800 (default)
./bin/sqlline.sh --color=true --verbose=true -u jdbc:ignite:thin://127.0.0.1:10801
./bin/sqlline.sh --color=true --verbose=true -u jdbc:ignite:thin://127.0.0.1:10802
mariaDB vs Apache Ignite 성능 비교
client : php (apache ignite 에서 제공하는 클래스 사용)
apache-ignite-2.7.0-bin/platforms/php
TCP/IP Discovery
Multicast
Static IP
apache ignite 위키
https://cwiki.apache.org/confluence/display/IGNITE/Continuous+Integration
apache ignite cache template
http://apache-ignite-users.70518.x6.nabble.com/Default-Cache-template-td19494.html
GRANT ALL ON *.* TO cute772@'192.168.0.%' IDENTIFIED BY 'foofoo!@';
INSERT INTO Person (id, name, city_id) VALUES (5, 'John Doe', 3);
INSERT INTO Person (id, name, city_id) VALUES (6, 'Jane Roe', 2);
INSERT INTO Person (id, name, city_id) VALUES (7, 'Mary Major', 1);
INSERT INTO Person (id, name, city_id) VALUES (8, 'Richard Miles', 2);
./bin/control.sh --port 48000 kill --yes
<property name="cacheConfiguration">
<list>
<bean id="cache-template-bean" abstract="true" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="cachetemplate"/>
<property name="cacheMode" value="REPLICATED" />
</bean>
</list>
</property>
In that case, you should be able to create a table:
CREATE TABLE person (
id LONG,
name VARCHAR,
city_id LONG,
PRIMARY KEY (id, city_id)
) WITH "template=cachetemplate";