基于WiredLB添加MINIO集群负载均衡

This commit is contained in:
zhangchengwei
2018-09-29 17:10:19 +08:00
committed by zhengchao
parent 09a3d6598d
commit d47599a45d
10 changed files with 96 additions and 20 deletions

View File

@@ -7,6 +7,7 @@
#include <event2/event.h>
#include <event.h>
#include <MESA/wiredLB.h>
#include "tango_cache_client.h"
#define RESPONSE_HDR_EXPIRES 1
@@ -45,13 +46,19 @@ struct easy_string
struct tango_cache_instance
{
char minio_hostlist[4096];
char minio_iplist[4096];
char bucketname[256];
char wiredlb_topic[64];
char wiredlb_group[64];
char wiredlb_datacenter[64];
u_int32_t minio_port;
u_int32_t wiredlb_override;
struct event_base* evbase;
struct event timer_event;
struct cache_statistics statistic;
CURLM *multi_hd;
void *runtime_log;
WLB_handle_t wiredlb;
time_t relative_ttl; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
u_int64_t cache_limit_size;
long max_cnn_host;
@@ -98,7 +105,7 @@ struct tango_cache_ctx
struct future* future;
char error[CURL_ERROR_SIZE];
char object_key[256];
char hostaddr[24];
char hostaddr[48];
enum CACHE_REQUEST_METHOD method;
enum CACHE_ERR_CODE error_code;