apollo

Apollo简介及工作原理

被刻印的时光 ゝ 提交于 2019-12-03 09:55:26
一、Apollo简介   1、Apollo是携程框架部门研发的分布式配置中心   2、集中化管理应用的不同环境和不同集群的配置   3、配置修改后能够实时推送到应用端   4、具备规范的权限、流程治理等特性 二、Apollo组成部分   Apollo包括服务端和客户端   服务端:基于Spring Boot和Spring Cloud开发,打包后可以直接运行,不需要额外安装Tomcat等应用容器   java客户端:不依赖任何框架,能够运行于所有Java运行时环境,同时对Spring/Spring Boot环境也有较好的支持 三、Apollo特性   1、同意管理不同环境、不同集群的配置   2、配置修改实时生效(热发布)   3、版本发布管理--所有配置都有版本概念,便于配置的回滚   4、灰度发布--点了发布后只对部分应用实例生效,等观察一段时没问题后再推送给所有应用实例   5、权限管理、发布审核、操作审计     权限管理--有完善的权限管理     发布审核--配置管理分了编辑发布两个环节,减少人为错误     操作审计--所有操作都有审计日志,可以方便追踪问题   6、客户端配置信息监控--可以在界面上方便看到配置在被那些实例使用   7、提供java和.net原生客户端,方便应用集成   8、提供了http接口,非java和.net应用也可以方便地使用   9

Max MQTT connections

◇◆丶佛笑我妖孽 提交于 2019-12-03 07:23:05
I have a need to create a server farm that can handle 5+ million connections, 5+ million topics (one per client), process 300k messages/sec. I tried to see what various message brokers were capable so I am currently using two RHEL EC2 instances (r3.4xlarge) to make lots of available resources. So you do not need to look it up, it has 16vCPU, 122GB RAM. I am nowhere near that limit in usage. I am unable to pass the 600k connections limit. Since there doesn't seem to be any O/S limitation (plenty of RAM/CPU/etc.) on either the client nor the server what is limiting me? I have edited /etc

Linux下安装 Apollo

╄→гoц情女王★ 提交于 2019-12-03 06:49:07
Apollo以ActiveMQ原型为基础,是一个更快、更可靠、更易于维护的消息代理工具。Apache称Apollo为最快、最强健的STOMP(Streaming Text Orientated Message Protocol,流文本定向消息协议)服务器. 它采用一个完全不同的消息分发架构,同ActiveMQ一样支持多种协议。如STOMP,AMQP,MQTT,Openwire,SSL和WebSockets. 一:linux下Apollo的安装 下载 apache-apollo-1.7-unix-distro.tar.gz 文件放到/usr/local/src目录下面 加压缩文件 tar -zxvf apache-apollo-1.7-unix-distro.tar.gz -C /usr/local 二:创建broker实例 一个broker实例是一个文件夹,其中包含所有的配置文件及运行时的数据,不如日志和消息数据。Apollo强烈建议不要把实例同安装文件放在一起。 在linux操作系统下面,建议将实例建在/var/lib/目录下面 cd /var/lib /usr/local/apache-apollo-1.7/bin/apollo create mybroker 创建成功后,在/var/lib/mybroker目录下可以看到如下目录 bin--------------------

GraphQL - How to respond with different status code?

老子叫甜甜 提交于 2019-12-03 06:04:33
I'm having a trouble with Graphql and Apollo Client. I always created differents responses like 401 code when I using REST but here I don't know how I to do a similar behavior. When I get the response I want it go to the catch function. I have this code in the front: client.query({ query: gql` query TodoApp { todos { id text completed } } `, }) .then(data => console.log(data)) .catch(error => console.error(error)); Can anybody help me? The way to return errors in GraphQL (at least in graphql-js) is to throw errors inside the resolve functions. Because HTTP status codes are specific to the HTTP

How do you get total contributions with Githubs API v4

依然范特西╮ 提交于 2019-12-03 05:45:37
I have been looking through the Github V4 API docs and I cannot seem to find a way to query total contributions for the year (as displayed on your github profile). Has anyone managed to use the new API to grab some statistics from your personal profile? I am using graphQL and a Personal Access Token on github, and managed to get minimal user profile data; username, profile name etc. There is no API for this as such. So there are two ways to go about it. Simple data scraping the user url or looping through each repo user has forked and then count the contribution. The later one will be more

spring cloud zuul 集成 spring config、eureka 实现动态路由

别说谁变了你拦得住时间么 提交于 2019-12-03 03:58:28
1.添加相关依赖包 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.4.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.hht.zool</groupId> <artifactId>demo</artifactId> <version>0.0.1-SNAPSHOT</version> <name>demo<

Why use IntrospectionFragmentMatcher?

蓝咒 提交于 2019-12-03 03:20:16
Is there any reason to use IntrospectionFragmentMatcher to determine concrete types of values returned from interface and union fields? I'm talking about apollo-client . I'm using InMemoryCache with addTypename: true , so the type is known the moment the client gets the response. Meanwhile my console is plagued with warnings like these: The only reason I see the documentation hint at is response validation. But why validate the server-sent response at all? If the server is not worth trusting, validation is useless anyway. The warnings seem to be a bug in apollo. https://github.com

React Apollo - Make Multiple Queries

≡放荡痞女 提交于 2019-12-03 03:06:35
问题 I have a queries file that looks like this: import {gql} from 'react-apollo'; const queries = { getApps: gql` { apps { id name } } `, getSubjects: gql` { subjects { id name } } ` }; export default queries; I then import this file to my React component: import React, {Component} from 'react' import queries from './queries' class Test extends Component { ... } export default graphql(queries.getSubjects)(graphql(queries.getApps)(Test)); This will only get data for one of the queries (getApps)

携程Apollo分布式配置中心部署以及使用

余生长醉 提交于 2019-12-03 01:35:18
理论指导: 参考1 apollo-configservice:提供配置获取接口,提供配置更新推送接口,接口服务对象为Apollo客户端 apollo-adminservice:提供配置管理接口,提供配置修改、发布等接口,接口服务对象为Portal,以及Eureka apollo-portal:提供Web界面供用户管理配置 apollo-client:Apollo提供的客户端程序,为应用提供配置获取、实时更新等功能 参考2 架构剖析 1 架构清晰剖析2 开始部署: https://github.com/ctripcorp/apollo 分布式部署指南 基于docker部署apollo分布式配置中心服务 部署节点,所需的tar包应用包,在apollo的github上下载 test1,192.168.0.133 ,dev test2,192.168.0.134 ,fat 部署步骤 创建ApolloPortalDB数据库 在test-01部署 docker run --restart always -d --name ApolloPortalDB --network yapi_net --ip 172.30.0.21 -v /opt/ApolloPortalDB/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD='aaaaaa' -p 3307:3306

ActiveMQ vs Apollo vs Kafka

▼魔方 西西 提交于 2019-12-03 01:10:07
问题 I don't have any previous experience with *MQs and I'm looking to build knowledge on JMS and message queues in general. That way, I wonder whether I should start with ActiveMQ or just "ignore" it altogether and start by teaching myself Apollo. Is Apollo as feature-complete as ActiveMQ? Does it implement JMS 2.0 (I see that ActiveMQ got stuck with 1.1)? Will I be missing something really important? Also, how does Kafka compare to these two solutions? 回答1: Apache ActiveMQ is a great workhorse