블로그 이미지
플로거
Android/J2EE/Web/Spring/Database

calendar

1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Notice

Statistics Graph
2019.01.08 10:37 Programming/Mysql

show variables like '%max_connections%';

=>

"max_connections"         "100"



show status like '%connect%';
=>
"Aborted_connects"         "53"
"Connections"                 "10832"
"Max_used_connections" "101"
"Threads_connected"         "100"



show status like 'Aborted%';
=>
"Aborted_clients"                 "5000"

"Aborted_connects"        "53"


show status like '%thread%';

=>

"Threads_cached"                 "5"

"Threads_connected"         "99"

"Threads_created"                 "1469"

"Threads_running"         "1"



Cache Miss Rate(%) =  Threads_created / Connections * 100
Connection Miss Rate(%) = Aborted_connects / Connections * 100
Connection Usage(%) = Threads_connected / max_connections * 100


Connection Usage(%)가 100% 라면 max_connections 수를 증가시켜 주십시요. Connection 수가 부족할 경우  ==> Too Many Connection 에러

==> max_connections 를 올려줌 


DB 서버의 접속이 많은 경우는 wait_timeout 을 최대한 적게 (30 정도를 추천) 설정하여 불필요한 연결을 빨리 정리필요. 그러나 Connection Miss Rate(%) 가 1% 이상이 된다면 wait_timeout 을 좀 더 길게 가져야 함. 


Cache Miss Rate(%) 가 높다면 thread_cache_size를 기본값인 8 보다 높게 설정하는 것이 좋습니다. 일반적으로 threads_connected 가 Peak-time 시 보다 약간 낮은 수치로 설정


MySQL 서버는 외부로 부터 접속 요청을 받을 경우 인증을 위해 IP 주소를 호스트네임으로 바꾸는 과정을 수행하여 접속시에 불필요한 부하 발생. 

my.cnf에서 skip-name-resolve를 설정, 접속시 IP 기반으로 접속을 하게 되면 hostname lookup 과정 생략되어 좀 더 빠르게 접속 가능


[권한필요 - root]
set global max_connections = 500;
set wait_timeout = 30;

[vi /etc/my.cnf]

skip-name-resolve


posted by 훈즈 플로거
2019.01.04 17:01 Programming/Angular

Angular Style Guide & Angular 2


The Angular 1 Style Guide.

The Angular 2 Style Guide.

https://angular.io

https://angular.io/docs/ts/latest/quickstart.html

https://angular.io/resources/live-examples/quickstart/ts/eplnkr.html

https://angular.io/docs/ts/latest/tutorial/

http://localhost:8080/index5.html


AngularJS Patterns: Clean Code

https://github.com/johnpapa/angular-styleguide/tree/master/a1

https://github.com/johnpapa/ng-demos

https://github.com/johnpapa/ng-demos/tree/master/modular

http://han41858.tistory.com/9

https://droidhere.com/02/angularjs-vs-angular-2-one-better/



posted by 훈즈 플로거
2019.01.04 15:54 Programming/Angular

Updating Angular

npm run update-deps

bower.json

angular version -> 해당 version 의 최신 버전으로 업데이트

"dependencies": {
   "angular": "~1.5.0",
   "angular-route": "~1.5.0",
   "angular-loader": "~1.5.0",
   "angular-mocks": "~1.5.0",
   "html5-boilerplate": "^5.3.0"
 }


===>


"dependencies": {
   "angular": "~1.5.11",
   "angular-route": "~1.5.11",
   "angular-loader": "~1.5.11",
   "angular-mocks": "~1.5.11",
   "html5-boilerplate": "^5.3.0"
 }


posted by 훈즈 플로거
2019.01.04 15:46 Programming/Angular

AngularJS Seed

- the seed for AngularJS apps

https://github.com/angular/angular-seed

git clone https://github.com/angular/angular-seed.git

cd angular-seed

npm install

npm start  - http://localhost:8000/index.html

Directory Layout - _test.js -> .spec.js

npm test

Running End-to-End Tests

cd e2e-tests

npm start

npm run update-webdriver

npm run protractor


posted by 훈즈 플로거
2019.01.04 11:14 Programming/Angular

Angularjs Tutorial


0 - Bootstrapping - https://docs.angularjs.org/tutorial/step_00

1 - Static Template - https://docs.angularjs.org/tutorial/step_01

2 - AngularJS Templates - https://docs.angularjs.org/tutorial/step_02

3 - Components - https://docs.angularjs.org/tutorial/step_03

4 - Directory and File Organization - https://docs.angularjs.org/tutorial/step_04

5 - Filtering Repeaters - https://docs.angularjs.org/tutorial/step_05

6 - Two-way Data Binding - https://docs.angularjs.org/tutorial/step_06

7 - XHR & Dependency Injection - https://docs.angularjs.org/tutorial/step_07

8 - Templating Links & Images - https://docs.angularjs.org/tutorial/step_08

9 - Routing & Multiple Views - https://docs.angularjs.org/tutorial/step_09

10 - More Templating - https://docs.angularjs.org/tutorial/step_10

11 - Custom Filters - https://docs.angularjs.org/tutorial/step_11

12 - Event Handlers - https://docs.angularjs.org/tutorial/step_12

13 - REST and Custom Services - https://docs.angularjs.org/tutorial/step_13

14 - Animations - https://docs.angularjs.org/tutorial/step_14

The End - https://docs.angularjs.org/tutorial/the_end


posted by 훈즈 플로거