Skip to content

Latest commit

 

History

History
100 lines (77 loc) · 2.47 KB

File metadata and controls

100 lines (77 loc) · 2.47 KB

evcache-server-spring-cloud-starter

Warning
This project is not an original EVCar(EVCache + Sidecar). EVCache Server composed memcached and Prana(Sidecar). EVCar is not released at this time, so I combined the functions of Eureka + Sidecar. You can find some hints about the function of EVCar below.

Example EVCache Server, See on evcache-server-sample

  1. Start Eureka Server See on eureka-server-sample

  2. Start memcached

  3. Dependency Management

repositories {
    jcenter() (1)
}

dependencies {
    compile 'com.github.aafwu00:evcache-server-spring-cloud-starter:x.y.z' (2)
}
  1. add jcenter() repository

  2. add dependency

    1. Write java source code

@SpringBootApplication
@EnableEVCacheServer # (1)
public class Application {
    public static void main(final String[] args) {
        new SpringApplicationBuilder(Application.class).run(args);
    }
}
  1. Using @EnableEVCacheServer annotation, that’s all

    1. Write application.yml code, See on Sample

spring:
  application:
    name: EVCACHE # (1)

eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/ # (2)

evcache:
  port: 11211 # (3)
  asg-name: Group1 # (4)
Table 1. Table EVCache Sidecar Properties
Name Default Description

evcache.public-hostname

localhost name

Hostname of Memcached Or Rend, If blank using localhost name

evcache.public-ipv4

localhost ip

Ip Address of Memcached Or Rend, If blank using localhost ip

evcache.local-ipv4

localhost ip

Ip Address of Memcached Or Rend, If blank using localhost ip

evcache.availability-zone

defaultZone

Default availability zone if none is resolved based on region.

evcache.asg-name

DEFAULT

Use AWS autoscaling group name(EVCache Group Name), when Eureka ASG name if blank

evcache.port

11211

Default Port of Memcached Or Rend

management.health.memcached.enabled

Spring Boot Health Check for Memcached