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
-
Start Eureka Server See on eureka-server-sample
-
Start memcached
-
Dependency Management
repositories {
jcenter() (1)
}
dependencies {
compile 'com.github.aafwu00:evcache-server-spring-cloud-starter:x.y.z' (2)
}
-
add
jcenter()
repository -
add dependency
-
Write java source code
-
@SpringBootApplication
@EnableEVCacheServer # (1)
public class Application {
public static void main(final String[] args) {
new SpringApplicationBuilder(Application.class).run(args);
}
}
-
Using
@EnableEVCacheServer
annotation, that’s all-
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)
-
EVCache App Name
-
memcached server port
-
evcache server group, shard name of replica set
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 |