Internet companies pioneering architecture raving

Written on 2018-02-01
Internet companies from the venture, each round of financing, to grow and develop, the successful listing of the various stages for different technical architecture, premature adopt too radical architecture may be a mismatch of manpower, cost, system, the use of outdated technology development constraints will be serious business. Good architecture is evolving, not a good start on the design-fits-all common architecture, but the master of which there are some general principles, let us take a lot less detours.
In the initial stage of business, usually you have only a few number of people, not to make a product on the market, you do not even how to react on the market, the product know whether the risk, then you need is to make the first version of the product as soon as possible, how simple how to. Before and after you can no hurry to end the separation, you do not need a full-time operation and maintenance personnel, if you need to move the end, need to find Android and IOS development. Accomplish this task, the minimum you need a Java development (HTML + Java + O & M), a mobile developer end, an artist (early part-time), why do you need to find Java developers, .NET instead of it? 1 is a cross-platform Java (not tied to a particular operating system), and the second is for Java developers the market share of the highest, meaning it easier to get them behind you, and the third is the Java system has a lot of open source technology companies at different stages of development of the latter are more or less able to find suitable open source product, which can save R & D investment, reduce time, improve product quality and service. At this stage, as the technical director of you, put aside the operational level things, technically you need to focus on:
versioning: Git, branch management? Products are not made out, heap code directly on the trunk right
project management: Tower, with micro-channel mobile end together, just weapon
technology architecture: SpringMVC / SpringBoot + Redis + [Tomcat] + Mybatis + Mysql / Oracle
Pure back-end project that uses SpringBoot, embedded container, web projects, using SpringMVC + Tomcat, ORM and Hibernate is not recommended to use Mybatis, using Hibernate premise it has the absolute ability to control, in fact, supported by Mybatis automatic generation tool, coding layer operation lasting no more than Hibernate workload. Database based on case selection, if the team on the database core knowledge in particular mastery of the index is not complete, then we can consider Oracle, where appropriate, the risks of using Mysql in the case of the database lack of knowledge is that: after a certain amount of data, you need not stop to do a lot of SQL-level performance optimization (indexing ah etc ...), and this amount of data than you will definitely think that the number is much smaller. The risk of using Oracle that: the future will face copyright issues. But it won the time to improve the business, that is, after the time to push the performance optimization, pre win more time to achieve the business. Specifically how to choose, depending on the technology team's ability, your ability to pressure businesses, weigh into it.
This time, system architecture, generally by using human subsystems, most typical: a core system (with user) + management background (with company operations), then each system is centralized, modular do It is the goal of this phase (in the high cohesion and low coupling is always right), pay attention to the pre-SQL minimize multi-table join, implemented in Java to Join.
Team building: First, the core technical staff is strongly recommended to have a well-known Internet company background (Guangzhou words: YY, UC, CD products will be, Netease, etc.), then you can in recruiting suitable as advocacy, which is conducive to you in fierce find more capable technical personnel on competitive recruitment market, of course, but also conducive to the valuation premium at the time of the late introduction of capital.
The key point of this stage architecture: componentization

Finally the product launch, the harvest of the first user. Congratulations, you have the burden of historical data, which a higher test of your technical ability. In a production environment to replace high-risk class file this action, careless tremor Delete a table of data in the production database, the application is not scheduled restart of these small errors will make your first batch of churn. Technically this time you need to focus on:
Continuous Integration: jenkins, jar package or packages on the production of war not to use a developer's machine hit, hit it with Jenkins
Bug Management: Zen, do not continue to record with Ecxel Bug the
access layer: Nginx as a reverse proxy, or Tomcat SpringBoot backend services running at least two, complete high availability
database: a main one, at least to achieve high availability using other Keepalived
setpoint availability usually applied after:
the Session share: Tomcat using Tomcat redis session manager, SpringBoot even more simple and requires only a few lines of code can be achieved. At the access layer will also be a session sticky (not recommended, back-end services stateless is our goal)
file upload, may be used as a local file system on a stage, and now you need to change to use FTP server
timed quartz task, Spring-quartz-schedule (essentially a database lock), Redis grab the lock, Zookeeper leader election a total of three programs can achieve our goals.
Upgrade: a dark and stormy night high in the evening, update half Tomcat / SpringBoot application (probably the one, Jiong), and then update the other half of the
file periodic backup: full backup database backup + increase, FTP server timed perfect, application log on a regular basis compressed archive
it to monitor network, CPU, memory, disk, such as partial hardware resources directly with Ali cloud: monitoring
architecture the key point of this stage:High Availability

By this time usually development, testing, operation and maintenance, staffing requirements have been successively put in place, after standardization responsibilities as follows:
Project Management: prototyping tool Axure, teamwork Tower, document server SVN
operation and maintenance:
DBA system
line processes on
automation operation and maintenance
server planning
monitoring system, and promote the development of interfaces to provide health check, log standardization, the introduction of Zabbix, in addition to system-level monitoring also need business-level monitoring
updated online database, application deployment operation and maintenance can only be performed by introducing lighter approval mechanism.
Account rights management, recycling root privileges, the application can no longer root started. Promote a variety of the company's application developer accounts, etc. must be made by the company in the public account application (if the application is a personal account of the staff separation rather cumbersome) etc. off various ports not needed to prevent security breaches.
Test:
Continuous Integration, Jenkins
Bug, test case management, Zen. Stress Test
Development:
version management, no longer as before the code is stored as a Git server to use, and release management processes must be established, the following is a more agile version of the management process for reference

Description: The
normal version of the above line as the target date to establish release, (development, testing, operation and maintenance) clear objectives.
Emergency Repair versions hotfix on the line as a target, on-line time than maneuvering.
Master record only stable online version of the code, each version of the administrator only needs to verify that the merge line by Master after release (or hotfix).
Technology stack: SpringMVC / SpringBoot Redis + + + Tomcat + Mysql Mybatis / Zookeeper the Oracle + + RabbitMQ
RabbitMQ on the performance not as Kafka, RocketMQ, but data consistency, stability, reliability, ease of use, ease of operation and maintenance get on a good balance, I believe, most of the time messaging middleware system is not the real bottleneck.
The key point of this stage architecture: standardization

These phases usually required for a long long time, even in the lifetime of many companies have not crossed the stage after fortunate enough to enter the next stage, facing pressure technology will exponentially increase
traffic split vertically (coarse-grained SOA , fine-grained micro services), data sub-library sub-table (often introduced as Mycat middleware, etc. to achieve), multi-level Cache.
The introduction of Zabbix monitoring platform, improve the monitoring system, including hardware, system-level, application-level, business-class and other multi-dimensional monitoring system. Automatic operation and maintenance and improve the DBA process.
After the system is split between an upper or downstream if the address held by the other configuration, the serious anti-dependence. This is usually we say: Why are you changing IP, with the restart of me. Initial will use a domain name instead of IP, but there are still a lot of duplication of tedious configuration work, when developed to a certain extent it will use the configuration center scheme, (I used the Apollo Association process, relative to other distribution center solutions lesser amount of agility) . If the system is split finer, you also need to find services and other services governance framework, one of the most popular Zookeeper and Eureka.
At this point some data processing, also use the stand-alone Quartz timed task can not perform competently, usually off-line distributed computing uses Hadoop, Map tasks through multi-machine distributed processing, through Reduce convergence results. For some online stream computing, such as a large electricity providers via real-time access log statistics PV and UV, will often consider using a Storm or Spark.
Flow control / fuse, the access control layer may be disposed nginx flow, the flow control layer is the application of the most common are Hystrix.
Platform, and product-oriented methods, the platform is based on the ability to precipitate in the background, through a combination of plus personalized reception arrangement basic skills, to create a variety of products, build brand consistency strategy.
Architecture point of this stage: high performance, high availability, scalability, security, platform
wake

Guess you like

Origin www.cnblogs.com/mzsg/p/11976675.html