전체 글 506

Spring actuator

현재는 JMX MBean기반으로 정보를 export하고 있다. 이 정보들을 actuator로 뿌려줘서 다른 모니터링 팀에서 수월하게 정보를 가져올 수 있게 하자기본적으로 Gague.builder를 통해 custom한 것을 추가하면 gauges.add(Gauge.builder("my.datasource.jndi.export.name", jeusDataSourcePoolMetadata, ds -> ds.getJndiExportName().hashCode()) .description("JNDI Export Name of the datasource") .tags("name", beanName) .register(regi..

WEB/시행착오 2024.06.17

Kafka Consumer - 02

Group Coordinator + Consumer RebalanceConsumer는 rebalancing이 진행이되면 consumer는 소비하는것을 멈추고 rebalancing에만 집중한다.이때 producer는 계속 생산이 되므로 , rebalancing이 끝나면 안 읽었던것들을 다 읽어야한다. 이 과정에서 오래걸리나 문제가 발생하는 경우가 생긴다.Group Coordinator에서 Consumer가 새로 추가되거나 종료될때 , 새로운 partition이 추가될 때 , consumer heartbeat에서 응답이 오지 않을 경우 , rebalancing을 수행하라고 Consumer group의 leader consumer에게 명령을 내린다.consumer가 group에 추가및 삭제 될 때마다 stat..

Cloud/kafka-core 2024.06.04

Lecture 4 - Maximum Likelihood Learning

using rnn with maksing to act like autoregressive model (looking back only , ordering conditional probabiltily)cnn with masked to be autoregressive, this masked convolution causes blind spot and need to be taken care of.one way is to use multiple convolution with different maskingPixelDefend can detect adversarial examplesBPD(X) ~= − log pCNN(X)/(I × J × K × log 2) for an image of resolution I ×..

Lecture 3 - Autoregressive Models

위 3가지 조건을 만족하는 model distribution을 찾고 싶다.in order to use chain rule you need to pick order, and there is no ground rule for this.seperate probability distribution using chain rule.first one is conditional probability table(CPT) because it is the very first pixel and doesn't rely on anythingfrom second pixel we use logisitic regressionautoregressive = trying to predict parts of each data point, g..

Lecture 2 - Background

represent 하는 state는 2^n 개이지만 joint pdf 를 나타내기위한 필요한 parameter 개수는 2^n-1 이다.마지막 1개는 1- (the other parameter's probabilty)를 해서 계산할 수 있으니까but when assuming RV are indepdent variable. we can calculate joint distribution by mulitpling each pdand then we only need N parameters , since we know how to calculate joint distribution.before example we didn't know how to calculate joint distrubiton so we lit..

Kafka Consumer - 01

Consumer 개요브로커의 Topic 메시지를 읽는 역할을 수행한다.모든 Consumer들은 고유한 그룹아이디 group.id를 가지는 Consumer Group에 소속되어야 한다.개별 Consumer Group내에서 여러 개의 Consumer들은 토픽 파티션 별로 분배된다.Consumer는 subscribe()를 호출하여 읽어 들이려는 토픽을 등록한다.Consumer는 poll 메소드를 이용하여 주기적으로 브로커의 토픽 파티션에서 메시지를 가져온다.메시지를 성공적으로 가져왔으면 commit을 통해서 _consumer_offsets 에 다음에 읽을 offset 위치를 기재한다. KafkaConsumer는 Fetcher, ConsumerClientNetwork등의 주요 내부 객체와 별도의 Heart Be..

Cloud/kafka-core 2024.05.16

Kafka Producer - 02

acks 값 에 따른 Producer의 전송 방식 차이 이해Producer는 Leader broke가 메시지 A를 정상적으로 받았는지에 대한 Ack 메시지를 받지 않고 다음 메시지인 메시지 B를 바로 전송메시지가 제대로 전송되었는지 브로커로 부터 확인을 받지 않기 때문에 메시지가 브로커에 기로되지 않더라도 재 전송하지 않음메시지 손실의 우려가 가장 크지만 가장 빠르게 전송할 수 있음IOT 센서 데이터 같이 손실에 민감하지 않을 때사용함Producer는 Leader broker 가 메시지 A를 정상적으로 받았는지에 대한 Ack 메시지를 받은 후 다음 메시지인 메시지B를 바로 전송. 만약 오류 메시지를 브로커로 부터 받으면 메시지 A 재전송메시지 A가 모든 Replicator에 완벽하게 복사되었는지의 여부는..

Cloud/kafka-core 2024.05.03